//启用yarn 作为资源管理框架

<configuration>

    <property>

        <name>mapreduce.framework.name</name>

        <value>yarn</value>

    </property>

</configuration>

<configuration>

<!-- Site specific YARN configuration properties -->

//启用高可用

<property>

   <name>yarn.resourcemanager.ha.enabled</name>

   <value>true</value>

 </property>

// 定义集群的名称

 <property>

   <name>yarn.resourcemanager.cluster-id</name>

   <value>cluster1</value>

 </property>

//为Resourcesmanager指定别名

 <property>

   <name>yarn.resourcemanager.ha.rm-ids</name>

   <value>rm1,rm2</value>

 </property>

 <property>

// 为别名指定服务器id

   <name>yarn.resourcemanager.hostname.rm1</name>

   <value>bigdatastorm</value>

 </property>

 <property>

   <name>yarn.resourcemanager.hostname.rm2</name>

   <value>bigdatahadoop</value>

 </property>

 <property>

// 指定zookeeper 服务器

   <name>yarn.resourcemanager.zk-address</name>

   <value>bigdataspark:2181,bigdatacloud:2181,bigdatahadoop:2181</value>

 </property>

//启用mapreducer 的shuffle 功能 

    <property>

        <name>yarn.nodemanager.aux-services</name>

        <value>mapreduce_shuffle</value>

    </property>

</configuration>

--------------------- 

作者:秉寒 

版权声明:本文为博主原创文章,转载请附上博文链接!