錯誤原因:
datanode的clusterID 和 namenode的 clusterID 不匹配。
解決辦法:
1、 打開 hadoop/tmp/dfs/namenode/name/dir 配置對應目錄下的 current 目錄下的 VERSION 文件,拷貝clusterID;
2、 打開 hadoop/tmp/dfs/datanode/data/dir 配置對應目錄下的 current 目錄下的 VERSION 文件,用拷貝的 clusterID 覆蓋原有的clusterID;
3、 保存后重新啟動 hadoop,datanode 進程就能正常啟動了。