目录
YARN集群规划
配置文件
配置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>node01</value>
</property>
<property>
<name>yarn.resourcemanager.hostname.rm2</name>
<value>node02</value>
</property>
<property>
<name>yarn.resourcemanager.zk-address</name>
<value>node02:2181,node03:2181,node04:2181</value>
</property>
启动
- node01节点上:start-yarn.sh(启动yarn集群)
- node02节点上:yarn-daemon.sh start resourcemanager(启动resourcemanager进程)
在浏览器内输入node01:8088
出现如图,则说明搭建成功
PS
在HDFS的根目录上新建一个目录的方法
[root@client mapreduce]# cd /opt/software/hadoop/hadoop-2.6.5/share/hadoop/mapreduce
[root@client mapreduce]# hdfs dfs -mkdir /input
[root@client mapreduce]# hadoop jar hadoop-mapreduce-examples-2.6.5.jar wordcount /input /wcoutput