不用zookeeper 只使用HA+yarn主备resourceManager如何配置?

<configuration>
<property>
    <!--rm连接失败的重试间隔-->
    <name>yarn.resourcemanager.connect.retry-interval.ms</name>
    <value>2000</value>
  </property>
 
 <!--开启resourcemanagerHA,默认为false-->
 <property>
   <name>yarn.resourcemanager.ha.enabled</name>
   <value>true</value>
 </property>
 
  <property>
    <!--启动自动故障转移,默认为false-->
    <name>yarn.resourcemanager.ha.automatic-failover.enabled</name>
    <value>false</value>
  </property>
  
  <property>
    <!--启用一个内嵌的故障转移,与ZKRMStateStore一起使用。-->
    <name>yarn.resourcemanager.ha.automatic-failover.embedded</name>
    <value>false</value>
  </property>
 
 <!--配置resourcemanager-->
 <property>
   <name>yarn.resourcemanager.ha.rm-ids</name>
   <value>rm1,rm2</value>
 </property>

 <property>
   <name>yarn.resourcemanager.hostname.rm1</name>
   <value>hadoopnode1</value>
 </property>
 
 <property>
   <name>yarn.resourcemanager.hostname.rm2</name>
   <value>hadoopnode2</value>
 </property>
 
  <!-- rm1 -->
  <property>
    <name>yarn.resourcemanager.address.rm1</name>
    <value>hadoopnode1:8032</value>
  </property>
   <!-- rm2 -->
  <property>
    <name>yarn.resourcemanager.address.rm2</name>
    <value>hadoopnode2:8032</value>
  </property>
  
  <!-- rm1 -->
  <property>
    <name>yarn.resourcemanager.scheduler.address.rm1</name>
    <value>hadoopnode1:8030</value>
  </property>
  <!-- rm2 -->
  <property>
    <name>yarn.resourcemanager.scheduler.address.rm2</name>
    <value>hadoopnode2:8030</value>
  </property>
  
  <!-- rm1 -->
  <property>
    <name>yarn.resourcemanager.resource-tracker.address.rm1</name>
    <value>hadoopnode1:8031</value>
  </property>
    <!-- rm2 -->
  <property>
    <name>yarn.resourcemanager.resource-tracker.address.rm2</name>
    <value>hadoopnode2:8031</value>
  </property>
  
  <!-- rm1 -->
  <property>
    <name>yarn.resourcemanager.admin.address.rm1</name>
    <value>hadoopnode1:8033</value>
  </property>
  <!-- rm2 -->
  <property>
    <name>yarn.resourcemanager.admin.address.rm2</name>
    <value>hadoopnode2:8033</value>
  </property>
 
  <!-- rm1 -->
  <property>
    <name>yarn.resourcemanager.webapp.address.rm1</name>
    <value>hadoopnode1:8088</value>
  </property>
  <!-- rm2 -->
  <property>
    <name>yarn.resourcemanager.webapp.address.rm2</name>
    <value>hadoopnode2:8088</value>
  </property>

  <!-- rm1 -->
  <property>
    <description>The https adddress of the RM web application.</description>
    <name>yarn.resourcemanager.webapp.https.address.rm1</name>
    <value>hadoopnode1:8090</value>
  </property>
  
  <!-- rm2 -->
  <property>
    <description>The https adddress of the RM web application.</description>
    <name>yarn.resourcemanager.webapp.https.address.rm2</name>
    <value>hadoopnode2:8090</value>
  </property>
  
  <property>
    <description>The class to use as the resource scheduler.</description>
    <name>yarn.resourcemanager.scheduler.class</name>
    <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler</value>
  </property>
  
  <property>
    <description>fair-scheduler conf location</description>
    <name>yarn.scheduler.fair.allocation.file</name>
    <value>${yarn.home.dir}/etc/hadoop/fairscheduler.xml</value>
  </property>
  
  <property>
    <name>yarn.nodemanager.resource.memory-mb</name>
    <value>30720</value>
  </property>

  <property>
    <name>yarn.nodemanager.resource.cpu-vcores</name>
    <value>12</value>
  </property>
  
  <property>
    <name>yarn.nodemanager.local-dirs</name>
    <value>/servers/hadoop/hadoop2.7.3/yarn/local</value>
  </property>

  <property>
    <name>yarn.log-aggregation-enable</name>
    <value>true</value>
  </property>

  <property>
    <name>yarn.nodemanager.remote-app-log-dir</name>
    <value>/tmp/logs</value>
  </property>
  
  <property>
    <description>the valid service name should only contain a-zA-Z0-9_ and can not start with numbers</description>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
  </property>
</configuration>
这是我的配置。

wangxiaolei

赞同来自:

具体是那个配置文件? 董老师的搭建视频讲解汇总就是没有zookeeper的,你可以参考看看。

fish - Hadooper

赞同来自:

yarn.resourcemanager.ha.automatic-failover.enabled配置为false便是使得错误恢复不依赖Zookeeper而是人工做切换。   你问这个问题的意图是?是否遇到了什么问题?

要回复问题请先登录注册