To Swap datanode and Namenode to deploy a new cluster or migrate the namenode role to new node, we can follow below points:
- Decommission data node where namenode will be moved.
- Stop the cluster.
- Create a tar of dfs.name.dir from current namenode.
- Copy all Hadoop config files from current NN to target NN.
- Replace the name/IP of target namenode by modifying core-site.xml.
- Restore tarball of dfs.name.dir. Make sure that full path is the same.
- Now start the cluster by starting a new namenode and one less datanode.
- Verify that everything is working perfectly.
- Add old namenode as datanode by configuring it as datanode.
- I would suggest to uninstall and then install Hadoop on both the nodes so that previous configuration does not cause any problem.
Comments
Post a Comment