CentOS6.5中怎么通过Hadoop用户实现Yarn伪分布式部署
这篇文章将为大家详细讲解有关CentOS6.5中怎么通过Hadoop用户实现Yarn伪分布式部署,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。
1.修改mapred-site.xml文件,没有创建
[hadoop@hadoop001 hadoop]$ pwd
/opt/software/hadoop-2.8.1/etc/hadoop
[hadoop@hadoop001 hadoop]$ cp mapred-site.xml.template mapred-site.xml
[hadoop@hadoop001 hadoop]$ vim mapred-site.xml -- 添加<property>
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
2.修改etc/hadoop/yarn-site.xml
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
3.Start Stop ResourceManager daemon and NodeManager daemon
[hadoop@hadoop001 sbin]$ ./start-yarn.sh
[hadoop@hadoop001 sbin]$ ./stop-yarn.sh
4.初次启动项目yarn启动失败,查看启动该日志
[hadoop@hadoop001 sbin]$ jps
18704 Jps
13767 SecondaryNameNode
13595 DataNode
13454 NameNode
[hadoop@hadoop001 sbin]$ cat /opt/software/hadoop-2.8.1/logs/yarn-hadoop-resourcemanager-hadoop001.out
[Fatal Error] mapred-site.xml:24:1: The end-tag for element type "property" must end with a '>' delimiter.
检查发现发现mapred-site.xml里>缺少 > 结束箭头
5.再次启动yarn 启动成功
[hadoop@hadoop001 sbin]$ ./start-yarn.sh
starting yarn daemons
starting resourcemanager, logging to /opt/software/hadoop-2.8.1/logs/yarn-hadoop-resourcemanager-hadoop001.out
192.168.0.129: starting nodemanager, logging to /opt/software/hadoop-2.8.1/logs/yarn-hadoop-nodemanager-hadoop001.out
[hadoop@hadoop001 sbin]$ jps
18883 NodeManager
18918 Jps
13767 SecondaryNameNode
18776 ResourceManager
13595 DataNode
13454 NameNode
6.启动控制台启动端口8088
ResourceManager - http://localhost:8088/
关于CentOS6.5中怎么通过Hadoop用户实现Yarn伪分布式部署就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。