是否可以在一个 JVM 中运行多个地图任务? [英] Is it possible to run several map task in one JVM?

查看:25
本文介绍了是否可以在一个 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?

推荐答案

通过指定作业配置mapred.job.reuse.jvm.num.tasks,作业可以使任务JVM被重用.如果值为 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆