Below are the steps to restart Namenode with Namenode Failover
1. Do neccessarry changes in stand by(node2-openstacklocal) and restart standby name node and wait until it reports it is in standby state
service hadoop-hdfs-namenode stop
service hadoop-hdfs-namenode start
2. Get service from hdfs-site.xml
dfs.ha.namenodes.mas
node1-openstacklocal,node2-openstacklocal
3. run below command to failover
sudo -u hdfs hdfs haadmin -failover
[root@node2 ~]# sudo -u hdfs hdfs haadmin -failover node1-openstacklocal node2-openstacklocal
Failover to NameNode at node2.openstacklocal/10.194.10.42:8020 successful
4. NOW standby(node2-openstacklocal) will become active and active(node1-openstacklocal) will be come standby
5. do neccesarry changes (heap..etc) standby(node1-openstacklocal) and restart standby(node1-openstacklocal)
service hadoop-hdfs-namenode stop
service hadoop-hdfs-namenode start
REF: https://hadoop.apache.org/docs/r2.7.0/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin
1. Do neccessarry changes in stand by(node2-openstacklocal) and restart standby name node and wait until it reports it is in standby state
service hadoop-hdfs-namenode stop
service hadoop-hdfs-namenode start
2. Get service from hdfs-site.xml
3. run below command to failover
sudo -u hdfs hdfs haadmin -failover
[root@node2 ~]# sudo -u hdfs hdfs haadmin -failover node1-openstacklocal node2-openstacklocal
Failover to NameNode at node2.openstacklocal/10.194.10.42:8020 successful
4. NOW standby(node2-openstacklocal) will become active and active(node1-openstacklocal) will be come standby
5. do neccesarry changes (heap..etc) standby(node1-openstacklocal) and restart standby(node1-openstacklocal)
service hadoop-hdfs-namenode stop
service hadoop-hdfs-namenode start
REF: https://hadoop.apache.org/docs/r2.7.0/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin
No comments:
Post a Comment