博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hadoop单机映射_如何在命令行中设置Hadoop的映射器和缩减器的数量?
阅读量:2523 次
发布时间:2019-05-11

本文共 987 字,大约阅读时间需要 3 分钟。

hadoop单机映射

How to set the number of mappers and reducers of in line?

如何在行中设置的映射器和缩减器的数量?

Number of mappers and reducers can be set like (5 mappers, 2 reducers):

可以设置映射器和缩减器的数量,例如(5个映射器,2个缩减器):

-D mapred.map.tasks=5 -D mapred.reduce.tasks=2

in the command line.

在命令行中。

In the code, one can configure JobConf variables.

在代码中,可以配置JobConf变量。

job.setNumMapTasks(5); // 5 mappersjob.setNumReduceTasks(2); // 2 reducers

Note that on Hadoop 2 (YARN), the mapred.map.tasks and mapred.reduce.tasks are and are replaced by other variables:

请注意,在Hadoop 2(YARN)上,已 mapred.map.tasksmapred.reduce.tasks并由其他变量替换:

mapred.map.tasks     -->.job.mapsmapred.reduce.tasks  -->	mapreduce.job.reduces
Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。


Using map reduce.job.maps on command line does not work. Is there a particular syntax to use?

在命令行上使用地图reduce.job.maps不起作用。 有没有要使用的特定语法?



You can add the options to the command like

您可以将选项添加到命令中,例如

bin/hadoop jar -Dmapreduce.job.maps=5 yourapp.jar ...

翻译自:

hadoop单机映射

转载地址:http://fpowd.baihongyu.com/

你可能感兴趣的文章
Mybatis Batch 批量操作
查看>>
Ubuntu server搭建Java web服务器
查看>>
WSGI学习系列WSME
查看>>
java读取xml配置文件和properties配置文件
查看>>
HDU 4300 Contest 1
查看>>
POJ 3311
查看>>
Button MouseEvent颜色变化
查看>>
Volist标签
查看>>
浅谈模块化
查看>>
14个免费访客行为分析工具
查看>>
beego orm关联查询之多对多(m2m)
查看>>
(转)arguments.callee移除AS3匿名函数的侦听
查看>>
onNewIntent调用时机
查看>>
MYSQL GTID使用运维介绍(转)
查看>>
Fail to start neutron-server
查看>>
景安快运挂在磁盘-支持宝塔
查看>>
word中交叉引用不能更新的解决方法
查看>>
高性能HTTP加速器Varnish(概念篇)
查看>>
Linux 如何写makefile文件
查看>>
flutter_webview_plugin 无法加载网页的异常处理
查看>>