YARN学习总结之环境搭建
阅读原文时间:2023年07月09日阅读:2

Yarn环境搭建(基于hadoop-2.6.0-cdh5.7.0 伪分布)

1)配置文件

etc/hadoop/mapred-site.xml:

mapreduce.framework.name yarn

etc/hadoop/yarn-site.xml:

yarn.nodemanager.aux-services mapreduce_shuffle

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