hadoop集群搭建(二)YARN高可用-创新互联
[root@hadoop01 ~]# vim /usr/local/hadoop-2.7.1/etc/hadoop/yarn-site.xml
成都创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于网站制作、成都做网站、太白网络推广、小程序设计、太白网络营销、太白企业策划、太白品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们大的嘉奖;成都创新互联公司为所有大学生创业者提供太白建站搭建服务,24小时服务热线:13518219792,官方网址:www.cdcxhl.com[root@hadoop01 hadoop-2.7.1]# vim ./etc/hadoop/mapred-site.xml
发送到集群服务器
[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
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
名称栏目:hadoop集群搭建(二)YARN高可用-创新互联
网站网址:http://hbruida.cn/article/deispd.html