-
HDFS block丢失过多进入安全模式(safe mode)的解决方法
Safe mode is ON. The reported blocks 3 needs additional 2 blocks to reach the threshold 0.9990 of total blocks 5. The number of live datanodes 2 has reached the minimum number 0. Safe mode will be turned off automatically once the thresholds have been reached.
说明我们的损坏的文件比例超过了阈值, 这个阈值配置在hdfs中, 也就是说不允许任何一个块损坏掉. 如果我们配置成99%应该就不会触发safemode了.
HDFS block丢失过多进入安全模式(Safe mode)的解决方法
步骤1 执行命令退出安全模式。hadoop dfsadmin -safemode leave
步骤2 执行健康检查,删除损坏掉的block。 hdfs fsck / -delete
注意: 这种方式会出现数据丢失,损坏的block会被删掉