user2152747
user2152747

Reputation: 21

How can i change namenode?

I configured my hadoop system in 5 machines. and I will get new one soon and this machine has more resources such as memory. So I want to change configuration that the new one is namenode. How can I change it without preserving my data in HDFS? Thank you

Upvotes: 2

Views: 2958

Answers (1)

IanWrigley
IanWrigley

Reputation: 11

  1. Shut down your cluster.
  2. Copy over the contents of the dfs.name.dir directories from the previous NameNode and ensure that they have the right permissions on your new machine.
  3. Make sure that the new NameNode is set to point to those directories (check the dfs.name.dir setting in hdfs-site.xml -- in fact, you should copy the entire set of config files from the old NameNode to the new machine, but do a sanity check to make sure that any directories they point to exist on the new machine).
  4. Now change the slave nodes and clients to point to the new NameNode (fs.default.name in core-site.xml on each machine including the NameNode itself) and you should be able to bring your cluster up again.

Upvotes: 1

Related Questions