Yarn环境搭建(基于hadoop-2.6.0-cdh5.7.0 伪分布)
1)配置文件
etc/hadoop/mapred-site.xml:
<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration>
etc/hadoop/yarn-site.xml:
<configuration> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> </configuration>
2)启动yarn相关进程
sbin/start-yarn.sh
3)验证
(1):jps
[hadoop@hadoop01 sbin]$ jps
12706 Jps
7880 DataNode
12393 NodeManager
8060 SecondaryNameNode
12300 ResourceManager
7791 NameNode
(2):浏览器方式:http://192.168.44.183:8088/
4)停止
sbin/stop-yarn.sh
5)提交MapReduce程序到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 1 3