楔子
记录hadoop使用遇到的问题
1 rm: Cannot delete /file. Name node is in safe mode.
删除时,提示 Name node is in safe mode
rm: Cannot delete /file. Name node is in safe mode.
C:\Users\MI>hadoop dfsadmin -safemode leave
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
Safe mode is OFF
C:\Users\MI>hadoop fs -rm -r -f /file
Deleted /file
hadoop dfsadmin -safemode value
来操作安全模式,值如下
- enter - 进入安全模式
- leave -强制NameNode离开安全模式
- get 返回安全模式开启的信息
- wait -等待,一致等到安全模式结束
参考
安全模式 https://blog.csdn.net/xw13106209/article/details/6866072