HDFS HA和Federation

cluster1cluster2組成hdfs聯盟,cluster1有namenodeA和namenodeB,cluster2有namenodeC和namenodeD。node

安裝配置好後啓動順序應該爲:bootstrap

1.在全部zookeeper集羣節點上啓動zookeeper:zkServer.sh start oop

2.在cluster1的namenodeA上格式化zookeeper集羣:hdfs zkfc -formatZKspa

3.在cluster2的namenodeC上格式化zookeeper集羣:hdfs zkfc -formatZK.net

4.在全部journal集羣節點上啓動journal:hadoop-daemon.sh start journalnodeorm

5.cluster1的namenodeA上格式化集羣:hdfs namenode -format -clusterId cluster1blog

6.啓動cluster1的namenodeAhadoop-daemon.sh start namenode教程

7.在cluster1的namenodeB上copynamenodeA的數據的數據:hdfs namenode -bootstrapStandbyhadoop

8.啓動cluster1的namenodeBhadoop-daemon.sh start namenodeget

9.在cluster2的namenodeC上格式化集羣:hdfs namenode -format -clusterId cluster2

10.啓動cluster2的namenodeC:hadoop-daemon.sh start namenode

11.在cluster2的namenodeD上copynamenodeC的數據的數據:hdfs namenode -bootstrapStandby

12.啓動cluster2的namenodeD:hadoop-daemon.sh start namenode

13.啓動全部namenode的zkfc:hadoop-daemon.sh start zkfc

14.啓動全部的datanode:hadoop-daemon.sh start datanode

15.在resourcemanager上啓動yarn:start-yarn.sh

16.驗證HA,殺死active的namenode:kill -9

17.提交做業驗證yarn驗證。

參考:國內第一篇詳細講解hadoop2的automatic HA+Federation+Yarn配置的教程

相關文章
相關標籤/搜索