I encountered some problems in learning hadoop over the past two weeks.
Today's question is how to restore the deleted datanode
At that time, because refreshNodes was not executed, the datanode was not started successfully.
The following error is reported:
ERROR org. apache. hadoop. hdfs. server. datanode. DataNode: org. apache. hadoop. ipc. RemoteException: java. io. IOException: verifyNodeRegistration: unknown datanode X003: 50010
The recovery steps are as follows:
First, delete the deleted datanode ip address in the excludes file.
Second, upload the excludes file to each machine.
Third, execute hadoop dfsadmin-refreshNodes on the master machine
Fourth, execute the hadoop-daemon.sh start datanode on the machine to recover
Hadoop-daemon.sh start tasktracker commands
Final verification
Run hadoop dfsadmin-report on the master machine
Check if multiple nodes exist.