How to configure hadoop-005-YARN HA
This article mainly introduces how to configure hadoop-005-YARN HA, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Yarn-site.xml and use zookeeper to manage the status of resourcemanager
Yarn.resourcemanager.ha.enabled
True
Yarn.resourcemanager.cluster-id
Cluster1
Yarn.resourcemanager.ha.rm-ids
Rm1,rm2
Yarn.resourcemanager.hostname.rm1
Master
Yarn.resourcemanager.hostname.rm2
Slave01
Yarn.resourcemanager.webapp.address.rm1
Master:8088
Yarn.resourcemanager.webapp.address.rm2
Slave01:8088
Yarn.resourcemanager.zk-address
Master:2181,slave01:2181,slave02:2181
Synchronize the configuration to the master and slave01 nodes, then start rm
Hadoop-2.7.2/sbin/yarn-daemon.sh start resourcemanager
View node status
Hadoop-2.7.2/bin/yarn rmadmin-getServiceState rm1
Hadoop-2.7.2/bin/yarn rmadmin-getServiceState rm2
[jxlgzwh@slave01 ~] $hadoop-2.7.2/sbin/yarn-daemon.sh start resourcemanager
Starting resourcemanager, logging to / home/jxlgzwh/hadoop-2.7.2/logs/yarn-jxlgzwh-resourcemanager-slave01.out
[jxlgzwh@slave01 ~] $jps
4160 DataNode
3986 NameNode
4853 ResourceManager
4885 Jps
3851 JournalNode
3502 QuorumPeerMain
4542 DFSZKFailoverController
[jxlgzwh@slave01 ~] $hadoop-2.7.2/bin/yarn rmadmin-getServiceState rm1
Standby
[jxlgzwh@slave01 ~] $hadoop-2.7.2/bin/yarn rmadmin-getServiceState rm2
Active
[jxlgzwh@slave01 ~] $jps
4160 DataNode
5425 Jps
3986 NameNode
4853 ResourceManager
3851 JournalNode
3502 QuorumPeerMain
4542 DFSZKFailoverController
[jxlgzwh@slave01 ~] $hadoop-2.7.2/sbin/yarn-daemon.sh stop resourcemanager
Stopping resourcemanager
[jxlgzwh@slave01 ~] $hadoop-2.7.2/bin/yarn rmadmin-getServiceState rm1
Active
[jxlgzwh@slave01 ~] $hadoop-2.7.2/bin/yarn rmadmin-getServiceState rm2
16-11-27 23:44:42 INFO ipc.Client: Retrying connect to server: slave01/192.168.31.130:8033. Already tried 0 time (s); retry policy is RetryUpToMaximumCountWithFixedSleep (maxRetries=1, sleepTime=1000 MILLISECONDS)
Operation failed: Call From slave01/192.168.31.130 to slave01:8033 failed on connection exception: java.net.ConnectException: reject connection; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
[jxlgzwh@slave01] $Thank you for reading this article carefully. I hope the article "how to configure hadoop-005-YARN HA" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!