Hadoop Safe mode


hadoop fs -rmr /hypertable
rmr: org.apache.hadoop.dfs.SafeModeException: Cannot delete /hypertable. Name node is in safe mode.
#### turn off hadoop safe mode firstly

hadoop dfsadmin -safemode leave

hadoop fs -rmr /hypertable
#开启safe mode
hadoop dfsadmin -safemode enter

## hadoop safe mode desc

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. Normally Namenode gets out of safemode automatically at the beginning. If required, HDFS could be placed in safemode explicitly using 'bin/hadoop dfsadmin -safemode' command. Namenode front page shows whether safemode is on or off. A more detailed description and configuration is maintained as JavaDoc for setSafeMode().

在name node 启动的时候,它会从fsimage载入文件系统状态并编辑日志文件.它将等待datanode来汇报他们的数据块,所以他不会过早的开始复制数据,尽管有足够复制那些存在于集群的数据. 在这个时间段,name node将置于安全模式.


在添加硬盘或者重做分区的时候,hadoop会将自己至于安全模式?


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值