2.4. Testing ResourceManager HA on a Single Node

To test ResourceManager HA on a single node or launch more than one ResourceManager on a single node, you must add the following settings in the yarn-site.xml file.

To enable ResourceManager rm1 to launch:

<property>
     <name>yarn.resourcemanager.ha.id</name>
     <value>rm1</value>
     <description>If we want to launch more than one RM in single node, we need this configuration</description>
</property>

To enable ResourceManager rm2 to launch:

<property>
     <name>yarn.resourcemanager.ha.id</name>
     <value>rm2</value>
     <description>If we want to launch more than one RM in single node, we need this configuration</description>
</property>

You should also explicitly set values specific to each ResourceManager for the following properties separately in yarn-site.xml:

  • yarn.resourcemanager.address.<rm-id>

  • yarn.resourcemanager.scheduler.address.<rm-id>

  • yarn.resourcemanager.admin.address.<rm-id>

  • yarn.resourcemanager.resource#tracker.address.<rm-id>

  • yarn.resourcemanager.webapp.address.<rm-id>

For example:

<!-- RM1 Configs -->

<property>
     <name>yarn.resourcemanager.address.rm1</name>
     <value>localhost:23140</value>
</property>

<property>
     <name>yarn.resourcemanager.scheduler.address.rm1</name>
     <value>localhost:23130</value>
</property>

<property>
     <name>yarn.resourcemanager.webapp.address.rm1</name>
     <value>localhost:23188</value>
</property>

<property>
     <name>yarn.resourcemanager.resource-tracker.address.rm1</name>
     <value>localhost:23125</value>
</property>

<property>
     <name>yarn.resourcemanager.admin.address.rm1</name>
     <value>localhost:23141</value>
</property>

<!-- RM2 configs -->
<property>
     <name>yarn.resourcemanager.address.rm2</name>
     <value>localhost:33140</value>
</property>

<property>
     <name>yarn.resourcemanager.scheduler.address.rm2</name>
     <value>localhost:33130</value>
</property>

<property>
     <name>yarn.resourcemanager.webapp.address.rm2</name>
     <value>localhost:33188</value>
</property>

<property>
     <name>yarn.resourcemanager.resource-tracker.address.rm2</name>
     <value>localhost:33125</value>
</property>

<property>
     <name>yarn.resourcemanager.admin.address.rm2</name>
     <value>localhost:33141</value>
</property>