Checking the ResourceManager State

About this task

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.

Procedure

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