编写文件
mapred-site.xml
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
yarn-site.xml
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.resourcemanager.ha.enabled</name>
<value>true</value>
</property>
<property>
<name>yarn.resourcemanager.cluster-id</name>
<value>cluster1</value>
</property>
<property>
<name>yarn.resourcemanager.ha.rm-ids</name>
<value>rm1,rm2</value>
</property>
<property>
<name>yarn.resourcemanager.hostname.rm1</name>
<value>ha01</value>
</property>
<property>
<name>yarn.resourcemanager.hostname.rm2</name>
<value>ha02</value>
</property>
<property>
<name>yarn.resourcemanager.zk-address</name>
<value>ha02:2181,ha03:2181,ha04:2181</value>
</property>
启动zk集群
${ hadoop}/sbin/
启动start-dfs.sh
ha01节点下
启动start-yarn.sh
ha02节点下
yarn-daemon.sh start resourcemanager
网友评论