Checking the ResourceManager State

When you configure manual or automatic failover, the ResourceManager is either in active or standby state. Each ResourceManager has a serviceID that identifies the service.
To check the state of a ResourceManager, run the following command with the serviceID:
yarn rmadmin -getServiceState <serviceID>
The command returns active or standby based on the state of the ResourceManager associated with the serviceID that you provide.
Note: Tip To determine the serviceIDs associated with the ResourceManagers in the cluster, run hadoop conf | grep yarn.resourcemanager.ha.rm-ids