Hadoop2.x HA架构与部署
2018-05-01 本文已影响0人
码戈
HDFS-HA、Zookepeer、YARN-HA配置
HDFS-HA
namenode namenode
(快捷启动所有节点服务 [sbin/start-dfs.sh],关闭 [sbin/stop-dfs.sh])
datanode datanode datanode
journalnode journalnode journalnode
zkfc zkfc
(启动服务 [sbin/hadoop-daemon.sh start zkfc] ---DFSZKFailoverController)
(zookeeper [bin/zkServer.sh start(stop)] --QuorumPeerMain)
YARN HA
ResourceManager ResourceManager
(启动服务 [sbin/yarn-daemon.sh start resourcemanager])
NodeManager NodeManager NodeManager
(启动服务 [sbin/yarn-daemon.sh start nodemanager])
(快捷启动 [sbin/start-yarn.sh])
配置hdfs-site.xml文件


通过SCP命令传导其余两个节点
安装并配置zookeeper(解压就好了),配置/conf/zoo.cfg

配置yarn-site.xml文件


启动服务测试及自动故障转移测试

创建output目录,并正常运行h02

bin/yarn jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.0.jar wordcount /user/mihan/data/h.txt /user/mihan/output/h03
在运行到MapReduce时,用(kill -9 )命令结束namenode


第二台机器转移故障

查看输出结果
