HA模式下的Hadoop+ZooKeepeer+Hbase启动和关闭顺序!(针对本实验室的集群)
1.本实验室的主机规划
2.总体的启动顺序和关闭顺序
·启动顺序
·关闭顺序
3.启动和关闭顺序的初步介绍
·启动顺序的初步介绍
·关闭顺序的初步介绍
4.总体的启动和关闭顺序表
1.本实验室的主机规划
* IP* | * 主机名* | * 用户名 * | * 全部进程* |
---|---|---|---|
10.6.3.43 | master5 | hadoop5 | NameNode DFSZKFailoverController ResourceManager HMaster JobHistoryServer |
10.6.3.33 | master52 | hadoop5 | NameNode DFSZKFailoverController ResourceManager HMaster JobHistoryServer |
10.6.3.48 | slave51 | hadoop5 | Datanode NodeManager HRegionServer JournalNode QuorumPeerMain |
10.6.3.32 | slave52 | hadoop5 | Datanode NodeManager HRegionServer JournalNode QuorumPeerMain |
10.6.3.36 | slave53 | hadoop5 | Datanode NodeManager HRegionServer JournalNode QuorumPeerMain |
2.总体的启动和关闭顺序
·启动顺序大致如下:
zookeepeer->hadoop->hbase
·关闭顺序大致如下(与启动相反)
hbase->hadoop->zookeepeer
3.启动和关闭顺序的初步介绍
·启动顺序的初步介绍
1. 启动zookeepeer {顺序启动slave51,slave52,slave53}
2. 启动hadoop {1.分别在slave51,slave52,slave53上启动journalnode(注:若为初次启动则需要先格式化);2.在master5上启动namenode(注:若为初次启动则需先在master5上格式化namenode);3.同步数据到master52上;4.在master52上启动namenode;5.在master5上启动所有的datanode(或者分别在slave51,slave52,slave53上启动datanode);6.在master5上启动YARN;7.在master52上单独启动YARN;8.在master5和master52上分别启动zkfc;9.在master5和master52上分别启动日志服务。}
3. 启动hbase {1.在master5上启动Hmaster和HRegionserver;2.在master52上启动备份Hmaster}
·关闭顺序的初步介绍(与开启相反)
1. 关闭hbase {1.在master52上关闭备份Hmaster;2.在master5上关闭Hmaster和HRegionserver}
2. 关闭hadoop {1.在master52和master5上分别关闭日志服务;2.在master52和master5上分别关闭zkfc;3.在master52上单独关闭YARN;4.在master5上关闭YARN;5.在master5上关闭所有的datanode(或者分别在slave53,slave52,slave51上关闭datanode);6.在master52上关闭namenode;7.在master5上关闭namenode;8.分别在slave53,slave52,slave51上关闭journalnode.}
3. 关闭zookeepeer {顺序关闭slave53,slave52,slave51}
4.总体的启动和关闭顺序表
·启动表格及命令
顺序 | 步骤 | 操作主机 | 命令 | 开启的相应进程 |
---|---|---|---|---|
1 | 启动 ZooKeeper 集群 | slave51、slave52、slave53 | zkServer.sh start | QuorumPeerMain |
2* | 格式化 ZooKeeper 集群(初次开启需要此步骤) | master5 | hdfs zkfc -formatZK | |
2 | 启动JournalNode集群 | slave51,slave52,slave53 | hadoop-daemon.sh start journalnode | JournalNode |
3* | 格式化集群的 NameNode(初次开启需要此步骤) | master5 | hdfs namenode -format | |
3 | 启动刚格式化的NameNode | master5 | hadoop-daemon.sh start namenode | NameNode |
4 | 同步NameNode1元数据到NameNode2 上 | master52 | hdfs namenode -bootstrapStandby | |
5 | 启动 NameNode2 | master52 | hadoop-daemon.sh start namenode | NameNode |
6 | 启动集群中所有的DataNode | master5/slave51、slave52、slave53 (二者选一即可,下同) | hadoop-daemons.sh start datanode/hadoop-daemon.sh start datanode | DataNode |
7 | 在RM1启动YAR | Nmaster5 | start-yarn.sh | ResourceManager(master5)NodeManager(slave节点) |
8 | 在RM2单独启动YARN | master52 | yarn-daemon.sh start resourcemanager | ResourceManager` |
9 | 启动ZKFC | master5 与 master52 | hadoop-daemon.sh start zkfc` | DFSZKFailoverController |
10 | 开启历史日志服务 | master5与master52 | mr-jobhistory-daemon.sh start historyserver` | JobHistoryServer |
11 | 启动主HMaster和HRegionServer | master5 | start-hbase.sh | HMaster (master5上)HRegionServer (slave节点上) |
12 | 启动备份HMaster | master52 | hbase-daemon.sh start master | HMaster |
·关闭表格及命令
顺序 | 步骤 | 操作主机 | 命令 | 关闭的相应进程 |
---|---|---|---|---|
1 | 关闭备份HMaster | master52 | hbase-daemon.sh stop master | HMaster |
2 | 关闭主HMaster和HRegionServer | master5 | stop-hbase.sh | HMaster(master5上)HRegionServer (slave节点上)` |
3 | 关闭历史日志服务 | master5与master52 | mr-jobhistory-daemon.sh stop historyserver` | JobHistoryServer |
4 | 关闭ZKFC | master5与master52 | hadoop-daemon.sh stop zkfc` | DFSZKFailoverController |
5 | 在RM2单独关闭YARN | master52 | yarn-daemon.sh stop resourcemanager | ResourceManager |
6 | 在RM1关闭YARN | master5 | stop-yarn.sh | ResourceManager(master5)NodeManager (slave节点)` |
7 | 关闭集群中所有的DataNode | master5/slave51、slave52、slave53 (二者选一即可,下同)` | hadoop-daemons.sh stop datanode/hadoop-daemon.sh stop datanode` | DataNode |
8 | 关闭NameNode2 | master52 | hadoop-daemon.sh stop namenode | NameNode |
9 | ‘关闭剩下的NameNode` | master5 | hadoop-daemon.sh stop namenode` | NameNode |
10 | 关闭JournalNode集群 | slave51、slave52、slave53 | hadoop-daemon.sh stop journalnode | JournalNode |
11 | 关闭ZooKeeper集群 | slave51、slave52、slave53 | zkServer.sh stop | QuorumPeerMain |
注:可以看出关闭和开启顺序几乎相反