Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop, mail # user - Reason of Formatting Namenode


Copy link to this message
-
Re: Reason of Formatting Namenode
Edward Capriolo 2011-03-10, 22:48
On Thu, Mar 10, 2011 at 12:48 AM, Adarsh Sharma
<[EMAIL PROTECTED]> wrote:
> Thanks Harsh, i.e why if we again format namenode after loading some data
> INCOMATIBLE NAMESPACE ID's error occurs.
>
>
> Best Regards,
>
> Adarsh Sharma
>
>
>
>
> Harsh J wrote:
>>
>> Formatting the NameNode initializes the FSNameSystem in the
>> dfs.name.dir directories, to prepare for use.
>>
>> The format command typically writes a VERSION file that specifies what
>> the NamespaceID for this FS instance is, what was its ctime, and what
>> is the version (of the file's layout) in use.
>>
>> This is helpful in making every NameNode instance unique, among other
>> things. DataNode blocks carry the namespace-id information that lets
>> them relate blocks to a NameNode (and thereby validate, etc.).
>>
>>
>
>

If you do not tell where you NN to store data it stores it to /tmp.
And your operating system cleans up temp.

The reason for the error you see is datanodes don't like to suddenly
connect to new namenodes. So as a safety they do not start up until
they are cleared.