集群规划:
NN-1:Namenode(active)
NN-1:Namenode(standby)
DN :Datanode
ZK:Zookeeper
ZKFC:Zookeeper Failover Controller
JUN:Journalnode
RS:ResourceManager
NM:NodeManager
服务器名称 | 进程 |
---|---|
node01 | NN-1、ZKFC、JUN 、RS |
node02 | NN-2、DN、ZK、ZKFC、JUN 、RS、NM |
node03 | DN、ZK、JUN、NM |
node04 | DN、ZK、NM |
首先应当搭建一个高可用完全分布式HDFS,在此基础上搭建yarn集群,前几篇已经写过就不再赘述。
mapreduce.framework.name
yarn
①打开mapred-site.xml
文件位于:/解压目录/etc/hadoop/yarn-site.xml
②修改配置文件
yarn.nodemanager.aux-services
mapreduce_shuffle
yarn.resourcemanager.ha.enabled
true
yarn.resourcemanager.cluster-id
cluster1
yarn.resourcemanager.ha.rm-ids
rm1,rm2
yarn.resourcemanager.hostname.rm1
node01
yarn.resourcemanager.hostname.rm2
node02
yarn.resourcemanager.zk-address
node02:2181,node03:2181,node04:2181
——命令:zkServer.sh start
start-dfs.sh
start-yarn.sh
yarn-daemon.sh start resourcemanager
hadoop jar hadoop-mapreduce-examples-2.6.5.jar wordcount /input /output
未完待续…