0
votes

I've successfully installed HADOOP for one user. When I installed HADOOP for another user, the data node is missing. The log file for data node shows:

2014-11-21 06:28:30,774 WARN org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Source name ugi already exists! 2014-11-21 06:28:32,161 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Incompatible namespaceIDs in /home/test/work/hadoopdata/dfs/data: namenode namespaceID = 1488453240; datanode namespaceID = 2050828596

One solution is to clear the "dfs" directory and then run the HADOOP again. But how to solve this problem with another method, i.e. resolving the namespace ID. I searched in the net but did not found any clear solution for this.

My OS is Ubuntu 14.04.

1
Are you installing hadoop in windows or linux ? - Suresh Ram
@MarHserus: Thanks for the question. I've edited my question and mentioned there. - user4221591
Format your namenode and restart you hadoop i think this may help you. - Suresh Ram

1 Answers

1
votes

This error generally occurs, if you format name node alone. If name node is formatted meta data information in name node are cleared and new meta data file will be created with new name space id. so, this id didn't match with name space id in data node. The Solution is

Edit namespace id of data node in /home/test/work/hadoopdata/dfs/data/current/VERSION, to be same as namespace id of name node in /home/test/work/hadoopdata/dfs/name/current/VERSION.

If you use this above solution, hadoop will run properly, but you cannot view the older files as because hadoop lost these information about these files once you formatted.

Another way is to delete dfs folder and format name node, and start hadoop

but you will lose entire data.

If you have backup of dfs/name folder replace it with current one.

I didn't tried last solution, but it should work.