1. 程式人生 > >WARN hdfs.DFSClient: DataStreamer Exception org.apache.hadoop.ipc.RemoteException(java.io.IOExcept

WARN hdfs.DFSClient: DataStreamer Exception org.apache.hadoop.ipc.RemoteException(java.io.IOExcept

使用web UI執行pi例項驗證hadoop叢集是否啟動成功

報如下錯誤:

Number of Maps  = 10

Samples per Map = 10

18/09/29 19:32:55 WARN hdfs.DFSClient: DataStreamer Exception

org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /user/zkpk/QuasiMonteCarlo_1538274773505_2146297817/in/part0 could only be replicated to 0 nodes instead of minReplication (=1).  There are 0 datanode(s) running and no node(s) are excluded in this operation.

原因:由於多次格式化namenode造成clusterID不一致

解決方案:

1.關閉叢集 stop-all.sh

2.刪除namenode資訊

rm -r  Hadoopdata/*

3.格式化namenode

Hdfs namenode -format

4.將新生成的clusterID拷貝至slave中datanode 的version檔案中

5.啟動叢集start-all.sh

6.重新運算

7.出結果,無報錯