2.1.4. Configure Automatic ResourceManager Failover

The preceding section described how to configure manual failover. In that mode, the system will not automatically trigger a failover from the active to the standby ResourceManager, even if the active node has failed. This section describes how to configure automatic failover.

  1. Add the following configuration options to the yarn-site.xml file:

    Property Name Recommended Value Description
    yarn.resourcemanager.ha.automatic-failover.zk-base-path /yarn-leader-election The base znode path to use for storing leader information, when using ZooKeeper-based leader election. This is an optional configuration. The default value is “/yarn-leader-election”.
    yarn.resourcemanager.cluster-id yarn-cluster The name of the cluster. In a HA setting, this is used to ensure the RM participates in leader election for this cluster, and ensures that it does not affect other clusters.

    Example:

    <property>
      <name>yarn.resourcemanager.ha.automatic-failover.zk-base-path</name>
      <value>/yarn-leader-election</value>
    <description>Optional setting. The default value is /yarn-leader-election</description>
    </property>
        
    <property>
       <name>yarn.resourcemanager.cluster-id</name>
       <value>yarn-cluster</value>
    </property>

  2. Automatic ResourceManager failover is enabled by default.

    If you previously configured manual ResourceManager failover by setting the value of yarn.resourcemanager.ha.automatic-failover.enabled to "false", you must delete this property to return automatic failover to its default enabled state.


loading table of contents...