hadoop Incompatible namespaceIDs
错误:
ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Incompatible namespaceIDs
DataNode的VERSION内容:
[hadoop@dl180-2 current]$ more /hdfs/tmp/dfs/data/current/VERSION #Mon Feb 25 07:42:26 HKT 2002 namespaceID=698320168 storageID=DS-222936147-10.200.6.22-50010-1014593256887 cTime=0 storageType=DATA_NODE layoutVersion=-18
NameNode的VERSION内容有两个:
[hadoop@dl180-1 logs]$ more /hdfs/tmp/dfs/data/current/VERSION #Thu Jun 16 06:36:44 HKT 2011 namespaceID=614577025 storageID=DS-469431412-10.200.6.21-50010-1307497858931 cTime=0 storageType=DATA_NODE layoutVersion=-18
[hadoop@dl180-1 history]$ more /hdfs/tmp/dfs/name/current/VERSION #Thu Jun 16 06:46:16 HKT 2011 namespaceID=614577025 cTime=0 storageType=NAME_NODE layoutVersion=-18
解决方法:
把DataNode上的namespaceID改成跟NameNode的一致即可。
用脚本可以循环一次执行完:
for i in `cat ~/hadoop/conf/slaves`;do ssh $i sed -i 's/698320168/614577025/' /hdfs/tmp/dfs/data/current/VERSION; echo $i; echo ; done
相关推荐
changjiang 2020-11-16
minerd 2020-10-28
WeiHHH 2020-09-23
Aleks 2020-08-19
WeiHHH 2020-08-17
飞鸿踏雪0 2020-07-26
tomli 2020-07-26
deyu 2020-07-21
strongyoung 2020-07-19
eternityzzy 2020-07-19
Elmo 2020-07-19
飞鸿踏雪0 2020-07-09
飞鸿踏雪0 2020-07-04
xieting 2020-07-04
WeiHHH 2020-06-28
genshengxiao 2020-06-26
Hhanwen 2020-06-25