是否可以在一个JVM中运行多个映射任务? [英] Is it possible to run several map task in one JVM?
本文介绍了是否可以在一个JVM中运行多个映射任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Hadoop中为我的地图任务共享大内存静态数据(RAM lucene索引)?有几种map / reduce任务可以共享相同的JVM?
I want to share large in memory static data(RAM lucene index) for my map tasks in Hadoop? Is there way for several map/reduce tasks to share same JVM?
推荐答案
作业可以使任务JVM通过指定作业配置mapred.job.reuse.jvm.num.tasks。如果该值为1(缺省值),则不重用JVM(即每个JVM有1个任务)。如果它是-1,则JVM可以运行的任务数量没有限制(同一作业)。也可以使用api指定大于1的值。
Jobs can enable task JVMs to be reused by specifying the job configuration mapred.job.reuse.jvm.num.tasks. If the value is 1 (the default), then JVMs are not reused (i.e. 1 task per JVM). If it is -1, there is no limit to the number of tasks a JVM can run (of the same job). One can also specify some value greater than 1 using the api.
这篇关于是否可以在一个JVM中运行多个映射任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文