YARN环境搭建
1)mapred-site.xml
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
2)yarn-site.xml
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
3) 启动YARN相关的进程
sbin/start-yarn.sh
4)验证
jps
ResourceManager
NodeManager
UI:http://hadoop000:
8088
5)停止YARN相关的进程
sbin/stop-yarn.sh
提交mr作业到YARN上运行:
/home/hadoop/app/hadoop-2.6.0-cdh5.7.0/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0-cdh5.7.0.jar
hadoop jar
hadoop-mapreduce-examples-2.6.0-cdh5.7.0.
jar
pi 2 3