Support Questions

Find answers, ask questions, and share your expertise

yarn resource manager path for automatic failover property


I am not able to identify where exactly this property is set for Yarn RM failover
'ActiveStandbyElector' for automatic failover
Please provide the path and property where I can check this



I am able to check this properties in the path /usr/hdp/current/hadoop-yarn-resourcemanager/etc/Hadoop/yarn-site









am I looking correct path?

Super Mentor

@Nani Bigdata

Is there any specific reason that you are looking out for that particular property "ActiveStandbyElector" Path?

Is your ResourceManager HA not functioning properly?

Although you can find that path "ActiveStandbyElector" here


1). Connect to your Zookeeper Quorum using "" as following:

# /usr/hdp/current/zookeeper-client/bin/  -server,,

2). List the contents of "ls /yarn-leader-election/yarn-cluster"

[zk:,, 2]  ls /yarn-leader-election/yarn-cluster
[ActiveBreadCrumb, ActiveStandbyElectorLock]

3). "" Get.

[zk:,, 3] get /yarn-leader-election/yarn-cluster/ActiveStandbyElectorLoc

yarn-cluster rm2
cZxid = 0x9000aee67
ctime = Mon Jun 17 03:24:12 UTC 2019
mZxid = 0x9000aee67
mtime = Mon Jun 17 03:24:12 UTC 2019
pZxid = 0x9000aee67
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x26ab8da9f808066
dataLength = 19
numChildren = 0

Super Mentor

@Nani Bigdata

Does it answers your query? Or do you have any additional query in this regard?
If not then please mark this HCC thread as resolved by clicking on the "Accept" Button.

Thank you Jay for detailed reply. I need to property 'ActiveStandbyElector' from zookeeper stand point of view , like how it selects standby Resource manager to active one's. so you say, we can get this details by connecting to zookeeper and listing the contents in yarn? thank you once again

Super Mentor

@Nani Bigdata

There are better other options as well to find out the Active/StandBy ResourceManagers.

1. Using command line as following. Please replace the "rm1" and "rm2" according to your config "yarn.resourcemanager.ha.rm-ids".

# su - yarn -c "yarn rmadmin -getServiceState rm1"
[root@newhwx2 ~]# su - yarn -c "yarn rmadmin -getServiceState rm2"

2. Using Ambari API calls:

# curl -s -u admin:admin -H "X-Requested-By: ambari" -X GET "http://<ambari-host>:<ambari-port>/api/v1/clusters/<cluster-name>/host_components?HostRoles/component_name=RESOURCEMANAGER&HostRoles/ha_state=ACTIVE" | grep -B1 -i "host_name"  
# curl -s -u admin:admin -H "X-Requested-By: ambari" -X GET "http://<ambari-host>:<ambari-port>/api/v1/clusters/<cluster-name>/host_components?HostRoles/component_name=RESOURCEMANAGER&HostRoles/ha_state=STANDBY" | grep -B1 -i "host_name"  



Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.