The yarn-site.xml file is configured with a list of
all the ResourceManagers.
The cluster ID is a logical name for the YARN cluster
1. Ambari click Services > YARN > Service Actions > Enable
ResouceManager HA. This opens a configuration wizard.
2. In
the second step you will see the second ResourceManager master component in
which node you want to be on.
3.
In review section
--logical cluster name is configured
by the
yarn.resourcemanager.cluster-id
property as the name yarn-cluster.
--yarn.resourcemanager.ha.rm-ids property contains a comma-separated
list with the strings rm1 and
rm2.
--Yarn.resourcemanager.ha.rm-ids =
“rm1,rm2”(logical names to reach resource manager)
-Yarn.resourcemanager.webapp.address.rm1
=”node1:8088”
Yarn.resourcemanager.hostname.rm1 =”node1”
Yarn.resourcemanager.webapp.address.rm2 =”node2:8088”
Yarn.resourcemanager.hostname.rm2 =”node2”
Yarn.resourcemanager.zk-address=”zk1:2181,zk2:2181,zk3:2181”
yarn.client.failover-proxy-provider
=”org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider” property determines the Java class
used by these entities to determine which ResouceManager is currently the
Active ResourceManager.
Yarn.resourcemanager.store.class
=”org.apache.hadoop.yarn.server.resoucemanager.recovery.ZKRMStateStore” (java
class used by ResourceManagers to work with ZooKeeper-based state store)
Yarn.resoucemanager.ha.automatic-failover.zk-base-path=”/yarn-leader-election”
yarn
rmadmin –getServiceState.
ActiveStandbyElector : The ResourceManagers have an
embedded Zookeeper-based ActiveStandbyElector used to determine which
ResourceManager should be Active.