Hdfs delete the contents of the error: rm: Can not delete / wxcm / Name node is in safe mode.

Question: delete the contents of hdfs error: RM: of Can not the Delete / wxcm / IS the Name the Node Safe in the MODE.

Reason: This is because when the distributed file system starts, there will be time to start in safe mode, when the case of a distributed file system in safe mode, the contents of the file system does not allow modification can not be deleted until Safe Mode End. Safety mode is used to check the validity of each data block DataNode on system startup, also copy or delete part of the data block is necessary according to the policy. Runtime can also enter Safe Mode command. In practice, when the system starts to modify and delete files there will be a security model does not allow modification of the error message, you can just wait for a while.

 

Solution:

(1) only need to wait a while;

(2) may be manually disengage security mode command: hdfs dfsadmin -safemode leave

 

The user may operate the security mode hdfs dfsadmin -safemode value, value of the parameters as follows:
HDFS dfsadmin -safemode Enter - into safe mode
hdfs dfsadmin -safemode leave - NameNode forced to leave the secure mode
hdfs dfsadmin -safemode get - Returns the security mode is enabled information
hdfs dfsadmin -safemode wait - wait until the end of the security mode.

 

But this time, even if carried out hdfs dfsadmin -safemode leave can not exit safe mode.

Run df -lh found that almost three-node disks are full, so clean up unnecessary files to free up disk space. Run hdfs dfsadmin -safemode leave again

Successful exit.

 

Guess you like

Origin www.cnblogs.com/mediocreWorld/p/11323463.html