一 停掉所有服务
[root@hadoop01 hadoop-2.7.1]# vim ./etc/hadoop/mapred-site.xml
<property>
<!–开启ubertask模式–>
<name>mapreduce.job.ubertask.enable</name>
<value>true</value>
</property>
<property>
<name>mapreduce.job.ubertask.maxmaps</name>
<value>9</value>
</property>
<property>
<name>mapreduce.job.ubertask.maxreduces</name>
<value>1</value>
</property>
<property>
<name>mapreduce.job.ubertask.maxbytes</name>
<value>102400000</value>
</property>
二 发送到所有小弟,覆盖相应文件
[root@hadoop01 hadoop-2.7.1]# scp -r ./etc/hadoop/mapred-site.xml hadoop01:/usr/local/hadoop-2.7.1/etc/hadoop/
[root@hadoop01 hadoop-2.7.1]# scp -r ./etc/hadoop/mapred-site.xml hadoop02:/usr/local/hadoop-2.7.1/etc/hadoop/
[root@hadoop01 hadoop-2.7.1]# scp -r ./etc/hadoop/mapred-site.xml hadoop03:/usr/local/hadoop-2.7.1/etc/hadoop/
三、测试
[root@hadoop01 hadoop-2.7.1]# yarn jar ./share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar wordcount /mapred-root-historyserver-yang02.log /test/testout/02
原创文章,作者:kepupublish,如若转载,请注明出处:https://blog.ytso.com/191725.html