首页 > 代码库 > 17-hadoop-yarn安装

17-hadoop-yarn安装

在搭建好的 resourceHA的环境下, 配置yarn

yarn是 hadoop2以后的计算框架,

 技术分享

通过ResourceManager的调用, 将我们写的程序包分到各个nodeManager上, 由于hadoop的理念是移动计算, 所以NodeManager和 DataNode是同一个机器

 

在 ${hadoop_home}/etc/hadoop 下

vim yarn-site.xml

<configuration>

 <property>
    <name>yarn.resourcemanager.ha.enabled</name>
    <value>true</value>
 </property>
 <property>
    <name>yarn.resourcemanager.cluster-id</name>
    <value>yarncluster</value>
 </property>
 <property>
    <name>yarn.resourcemanager.ha.rm-ids</name>
    <value>rm1,rm2</value>
 </property>
 <property>
    <name>yarn.resourcemanager.hostname.rm1</name>
    <value>192.168.208.106</value>
 </property>
 <property>
    <name>yarn.resourcemanager.hostname.rm2</name>
    <value>192.168.208.107</value>
 </property>
 <property>
    <name>yarn.resourcemanager.zk-address</name>
    <value>192.168.208.106:2181,192.168.208.107:2181,192.168.208.108:2181</value>
 </property>

 <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
 </property>
</configuration>

 然后  vim mapred-site.xml

<configuration>
    <property>
       <name>mapreduce.framework.name</name>
       <value>yarn</value>
    </property>
</configuration>

 

17-hadoop-yarn安装