namenode节点上配置Map/Reduce计算引擎跑在yarn这个资源调度平台上;
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
namenode配置yarn-site.xml文件
指定resourcemanager在master节点上
<property>
<name>yarn.resourcemanager.hostname</name>
<value>master</value>
</property>
配置计算mapreduce相关的
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
执行示例
hadoop jar /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.3.jar wordcount 10803060234.txt /output
原文地址:http://blog.51cto.com/6000734/2296319
时间: 2024-11-09 04:03:55