Created 10-10-2017 01:21 PM
Is it possible to identify active YARN ResourceManager using ZooKeeper or any other method?
Created 10-10-2017 02:50 PM
You can also get it using Ambari REST API
http://<ambari-host>:<ambari-port>/api/v1/clusters/<cluster-name>/host_components?HostRoles/componen...
To get STANDBY RM , you can replace ha_state with STANDBY in the above URL
Thanks,
Aditya
Created 10-10-2017 02:42 PM
Hi @Nikita Kiselev,
You can get the active Yarn RM Id from zookeeer.
cd /usr/hdp/current/zookeeper-client/bin ./zkCli.sh -server <zk-quorum> [zk: localhost:2181(CONNECTED) 14]: get /yarn-leader-election/<cluster-id>/ActiveStandbyElectorLock
Thanks,
Aditya
Created 10-10-2017 06:36 PM
Thanks! Which keytab I should use to get access to this Zookepper Node (kerberized cluster)? Is it possible to use ZooKeeper Java API to get same info?
Created 10-11-2017 05:17 AM
You can use the yarn keytab to access this . (/etc/security/keytabs/yarn.headless.keytab).
Yes, can you access this using ZK Java API as well. Check the ZK Java example here.
Also, were you able to get it using the Ambari REST API as mentioned in my another answer.
Thanks,
Aditya
Created 10-10-2017 02:50 PM
You can also get it using Ambari REST API
http://<ambari-host>:<ambari-port>/api/v1/clusters/<cluster-name>/host_components?HostRoles/componen...
To get STANDBY RM , you can replace ha_state with STANDBY in the above URL
Thanks,
Aditya
Created 10-10-2017 06:36 PM
@Nikita Kiselev, you can also use yarn cli to figure out active/stand by RM.
You can find out RM-Ids from yarn-site.xml. Look for yarn.resourcemanager.ha.rm-ids properties.
<property> <name> yarn.resourcemanager.ha.rm-ids</name> <value> rm1, rm2</value> </property>
Run "yarn rmadmin -getServiceState rm1" to find out state of RM1. It will return active if RM1 is an active RM or else it will return standby. You can run same command to know rm2 status too. ( yarn rmadmin -getServiceState rm2).