does hadoop namenode dirs synchronize after a failure?

What happens in this scenario: Namenode is writing to two directories on two different drives, one is local and the other (remote) is mounted . Now, the namenode fails and we launch namenode process on the remote machine (it has a copy of the original namenode data, so it's safe) and change namenode's ip on all datanodes. After a while, we manage to bring the original namenode to life with exact previous configuration. We stop the namenode process on the remote machine. Now, will the local fs.name.dir be synchronized with the mounted one (I mean the diff which was accumulated on the mounted dir, while the original namenode was down) or there will be a problem with namenode data consistency?

Answers


Now, will the local fs.name.dir be synchronized with the mounted one (I mean the diff which was accumulated on the mounted dir, while the original namenode was down) or there will be a problem with namenode data consistency?

The local NN data will be out-of-date for the time it was down. All the changes done to the NN namespace on the remote will not be there on the local NN.

Note than NN only stores the namespace for the filesystem and also the namespace to block-id mapping. Where the blocks are stored is not stored in NN. When a DN starts, it sends the block report to the NN.

Check this and this on the HDFS NN HA.

change namenode's ip on all datanodes. After a while, we manage to bring the original namenode to life with exact previous configuration. We stop the namenode process on the remote machine.

There will be downtime for the above mentioned scenarios.


Need Your Help

OutOfMemoryException appears by loading pictures

android bitmap

I want to take pictures and load them into an imageview, so that I can switch through the pictures. The picture paths are saved in a database, which is refered to my Projects. So when I load pictures

How do I get a data associated with a button pressed?

android android-alertdialog android-button

When a user selects an item to delete, I open an alertDialog to make sure he wants to delete it. When I get the onClick for BUTTON_POSITIVE I need to get the file name to delete. This was known bef...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.