网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

hadoop集群搭建(二)YARN高可用

[root@hadoop01 ~]# vim /usr/local/hadoop-2.7.1/etc/hadoop/yarn-site.xml

在定州等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供网站制作、网站设计 网站设计制作按需制作,公司网站建设,企业网站建设,高端网站设计,成都全网营销推广,成都外贸网站制作,定州网站建设费用合理。

yarn.nodemanager.aux-services

mapreduce_shuffle

yarn.resourcemanager.ha.enabled

true

yarn.resourcemanager.ha.automatic-failover.enabled

true

yarn.resourcemanager.cluster-id

qianfengyarn

yarn.resourcemanager.ha.rm-ids

rm1,rm2

yarn.resourcemanager.hostname.rm1

hadoop01

yarn.resourcemanager.hostname.rm2

hadoop02

yarn.resourcemanager.webapp.address.rm1

hadoop01:8088

yarn.resourcemanager.webapp.address.rm2

hadoop02:8088

yarn.resourcemanager.zk-address

hadoop01:2181,hadoop02:2181,hadoop03:2181

[root@hadoop01 hadoop-2.7.1]# vim ./etc/hadoop/mapred-site.xml

mapreduce.framework.name

yarn

true

mapreduce.map.memory.mb

1024

mapreduce.jobhistory.address

hadoop01:10020

mapreduce.jobhistory.webapp.address

hadoop01:19888


发送到集群服务器

[root@hadoop01 hadoop-2.7.1]# scp -r ./etc/hadoop/mapred-site.xml hadoop02:/usr/local/hadoop-2.7.1/etc/hadoop/

mapred-site.xml                                                                        100% 1218     1.2KB/s   00:00

[root@hadoop01 hadoop-2.7.1]# scp -r ./etc/hadoop/mapred-site.xml hadoop03:/usr/local/hadoop-2.7.1/etc/hadoop/

mapred-site.xml                                                                        100% 1218     1.2KB/s   00:00

[root@hadoop01 hadoop-2.7.1]# scp -r ./etc/hadoop/yarn-site.xml hadoop03:/usr/local/hadoop-2.7.1/etc/hadoop/

yarn-site.xml                                                                          100% 1845     1.8KB/s   00:00

[root@hadoop01 hadoop-2.7.1]# scp -r ./etc/hadoop/yarn-site.xml hadoop02:/usr/local/hadoop-2.7.1/etc/hadoop/

yarn-site.xml


[root@hadoop01 hadoop-2.7.1]# start-yarn.sh

starting yarn daemons

starting resourcemanager, logging to /usr/local/hadoop-2.7.1/logs/yarn-root-resourcemanager-hadoop01.out

hadoop01: starting nodemanager, logging to /usr/local/hadoop-2.7.1/logs/yarn-root-nodemanager-hadoop01.out

hadoop03: starting nodemanager, logging to /usr/local/hadoop-2.7.1/logs/yarn-root-nodemanager-hadoop03.out

hadoop02: starting nodemanager, logging to /usr/local/hadoop-2.7.1/logs/yarn-root-nodemanager-hadoop02.out

[root@hadoop02 sbin]# yarn-daemon.sh start resourcemanager

starting resourcemanager, logging to /usr/local/hadoop-2.7.1/logs/yarn-root-resourcemanager-hadoop02.out

查看ResourceManager状态

[root@hadoop01 hadoop-2.7.1]# yarn rmadmin -getServiceState rm1

18/01/13 16:17:56 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

active

[root@hadoop02 sbin]# yarn rmadmin -getServiceState rm2

18/01/13 16:20:51 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

standby

[root@hadoop01 ~]# start-all.sh


[root@hadoop01 ~]# service ntpd start


集群所有机器开启zookeeper,zkServer.sh start

[root@hadoop01 ~]# yarn-daemon.sh start resourcemanager

[root@hadoop01 ~]# start-dfs.sh

所有的进程必须都有,请仔细核对

[root@hadoop01 logs]# jps

8608 JobHistoryServer

16833 DataNode

3155 QuorumPeerMain

17300 ResourceManager

17463 Jps

16727 NameNode

17210 DFSZKFailoverController

17423 NodeManager

17055 JournalNode

[root@hadoop02 ~]# jps

9472 DFSZKFailoverController

7108 ResourceManager

9254 DataNode

9719 Jps

9353 JournalNode

9566 NodeManager

9183 NameNode

2751 QuorumPeerMain

[root@hadoop03 ~]# jps

2546 QuorumPeerMain

6738 Jps

6503 JournalNode

6408 DataNode

6606 NodeManager

8608 JobHistoryServer

[root@hadoop01 logs]# mr-jobhistory-daemon.sh stop historyserver

[root@hadoop01 logs]# mr-jobhistory-daemon.sh start historyserver

7108 ResourceManager

[root@hadoop02 ~]# stop-yarn.sh

stopping yarn daemons

stopping resourcemanager

hadoop02: no nodemanager to stop

hadoop01: no nodemanager to stop

hadoop03: no nodemanager to stop

no proxyserver to stop

[root@hadoop02 sbin]# yarn-daemon.sh start resourcemanager

[root@hadoop02 ~]# hadoop-daemon.sh start namenode

starting namenode, logging to /usr/local/hadoop-2.7.1/logs/hadoop-root-namenode-hadoop02.out

测试

hadoop jar /usr/local/hadoop-2.7.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.1.jar wordcount /README.txt /out/05


当前题目:hadoop集群搭建(二)YARN高可用
本文链接:http://bjjierui.cn/article/ppscee.html

其他资讯