Member since
03-20-2019
4
Posts
0
Kudos Received
0
Solutions
12-29-2015
08:55 AM
Step 1. vi /etc/hadoop/conf/yarn-site.xml Add Follow line <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>
<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> <!-- RM1 Configs -->
<property>
<name>yarn.resourcemanager.address.rm1</name> <value>sandbox.hortonworks.com:23140</value> </property> <property>
<name>yarn.resourcemanager.scheduler.address.rm1</name> <value>sandbox.hortonworks.com:23130</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address.rm1</name> <value>sandbox.hortonworks.com:23188</value> </property>
<property> <name>yarn.resourcemanager.resource-tracker.address.rm1</name> <value>sandbox.hortonworks.com:23125</value> </property>
<property> <name>yarn.resourcemanager.admin.address.rm1</name> <value>sandbox.hortonworks.com:23141</value>
</property>
<!-- RM2 configs --> <property> <name>yarn.resourcemanager.address.rm2</name> <value>sandbox.hortonworks.com:33140</value> </property> <property>
<name>yarn.resourcemanager.scheduler.address.rm2</name> <value>sandbox.hortonworks.com:33130</value>
</property> <property>
<name>yarn.resourcemanager.webapp.address.rm2</name>
<value>sandbox.hortonworks.com:33188</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address.rm2</name>
<value>sandbox.hortonworks.com:33125</value> </property>
<property>
<name>yarn.resourcemanager.admin.address.rm2</name>
<value>sandbox.hortonworks.com:33141</value> </property>
<property>
<name>yarn.resourcemanager.ha.enabled</name> <value>true</value>
</property> <property> <name>yarn.resourcemanager.ha.rm-ids</name> <value>rm1,rm2</value>
</property>
<property>
<name>yarn.resourcemanager.recovery.enabled</name> <value>true</value>
</property>
<property> <name>yarn.resourcemanager.store.class</name>
<value>org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore</value>
</property>
<property> <name>yarn.resourcemanager.zk-address</name>
<value>sandbox.hortonworks.com:2181</value>
<description>For multiple zk services, separate them with comma</description>
</property> <property> <name>yarn.resourcemanager.cluster-id</name> <value>yarn-cluster</value> </property>
<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> <property>
<name>yarn.resourcemanager.zk-state-store.address</name> <value>sandbox.hortonworks.com:2181</value>
</property> Manual Start ZooKeeper.Start hdfs Start yarn .. . [yarn@sandbox ~]$ yarn rmadmin -getServiceState rm1
15/12/29 08:43:30 INFO ipc.Client: Retrying connect to server: sandbox.hortonworks.com/192.168.182.145:23141. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=1, sleepTime=1000 MILLISECONDS)
Operation failed: Call From sandbox.hortonworks.com/192.168.182.145 to sandbox.hortonworks.com:23141 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused [yarn@sandbox ~]$ yarn rmadmin -getServiceState rm2 standby
... View more
Labels:
- Labels:
-
Apache Hadoop
-
Apache YARN
-
Apache Zookeeper
-
HDFS