问题
I am trying to delete a folder in my Cosmos account, but I get the SafeModeException:
# hadoop fs -rmr /home/<user>/input
rmr: org.apache.hadoop.hdfs.server.namenode.SafeModeException:
Cannot delete /user/<user>/input. Name node is in safe mode
回答1:
During start up Namenode loads the filesystem state from fsimage and edits log file. It then waits for datanodes to report their blocks so that it does not prematurely start replicating the blocks though enough replicas already exist in the cluster. During this time Namenode stays in safemode. A Safemode for Namenode is essentially a read-only mode for the HDFS cluster, where it does not allow any modifications to filesystem or blocks. And it takes some time to do above operations and after that it comes out of same node.
If still that doesn't happen or you want the namenode to leave safe mode then give
hadoop dfsadmin -safemode leave
来源:https://stackoverflow.com/questions/32987760/fi-ware-cosmos-name-node-is-in-safe-mode