Failed to start namenode in hadoop?
Change your following properties from:
<property>
<name>dfs.namenode.name.dir</name>
<value>C:/hadoop/data/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>C:/hadoop/data/datanode</value>
</property>
To:
<property>
<name>dfs.namenode.name.dir</name>
<value>/hadoop/data/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/hadoop/data/datanode</value>
</property>
For windows, directories should be similar to this format /c:/path/to/dir
or file:///D:/path/to/dir
:
I've tried using "/hadoop/data/namenode" which prevents starting namenode due to non existence of specified namenode directory .. I have found it is storing files in c drive when using "/hadoop/data/namenode" but while starting dfs it is gonna resolve paths relatively to the drive where hadoop source is residing.
I have switch to use the following and it worked fine:
<property>
<name>dfs.namenode.name.dir</name>
<value>/d:/hadoop/data/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/d:/hadoop/data/datanode</value>
</property>
Hint: Don't forget the prefix slash before drive name /d:/