1.HDFS-HA架构原理介绍
2.HDFS-HA 详细配置
namenode namenode
datanode datanode datanode
journalnode journalnode journalnode
zkfc zkfc
参考官方网站:http://hadoop.apache.org/docs/r2.5.2/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html
1.备份原来的配置
cp -r hadoop/ dist-hadoop
2.备份datanode数据存储的目录在创建新目录
mv tmp/ dist-tmp
mkdir tmp
3.HDFS-HA 详细配置-(hdfs-site.xml)
参考官方网站:http://hadoop.apache.org/docs/r2.5.2/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html
1.配置5个,如图:
2.补充:设计编辑日志的目录(journalnode)
1.创建一个新目录和文件
mkdir jn
2.查看文件目录
pwd
4.HDFS-HA 详细配置-(core-site.xml)
http://hadoop.apache.org/docs/r2.5.2/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html
配置如下:
HDFS-HA配置成功
3.HDFS-HA 服务启动及自动故障转移测试
4.基于Zookeeper的HA配置
参考官方网站:http://hadoop.apache.org/docs/r2.5.2/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html
启动
5.YARN-HA架构原理介绍
节点服务配置
resourcemanager resourcemanager
nodemanager nodemanager nodemanager
6. YARN-HA 详细配置-(yarn-site.xml)
参考官方网站:http://hadoop.apache.org/docs/r2.5.2/hadoop-yarn/hadoop-yarn-site/ResourceManagerHA.html
分发:
scp -r etc/hadoop/yarn-site.xml bigdata-pro02.kfk.com:/opt/modules/hadoop-2.5.0/etc/hadoop/
scp -r etc/hadoop/yarn-site.xml bigdata-pro03.kfk.com:/opt/modules/hadoop-2.5.0/etc/hadoop/
7. YARN-HA 服务启动及自动故障转移测试
8.总结
启动所有节点服务
机器一:
1.hadoop HDFS
sbin/start-dfs.sh
2.zookeeper
bin/zkServer.sh start
3.hadoop 自动转移服务
sbin/hadoop-daemon.sh start zkfc
4.hadoop YARN
sbin/start-yarn.sh
机器二:
1.zookeeper
bin/zkServer.sh start
2.hadoop 自动转移服务
sbin/hadoop-daemon.sh start zkfc
机器三(同机器二)
测试服务同第14课方法一样,中间中断一个服务器resourcemanager的服务看是否自动转移