名称节点处于安全模式 [英] Name node is in safe mode
问题描述
我提到这些问题
如何解决这个问题?
解决方案这是否总是发生或者仅在开始时才启动hadoop?
如果只是在开始的时候,然后等待一段时间,以便NameNo在访问hdfs之前检查一切是否正常。如果它在相当长的时间后没有离开安全模式,那意味着文件系统存在一些不平衡(例如在复制或损坏的块下)。在一段时间后,复制块将自动保持平衡。对于损坏的块,您可以查看此命令的输出:
hdfs fsck -list-corruptfileblocks
尝试使用以下命令删除损坏的块:
如果@Nishu建议不起作用,请使用 I referred to these questions Name node is in safe mode. Not able to leave and SafeModeException : Name node is in safe mode. the commands i have executed is below it shows that the safe mode is off but the immediate next command shows name node is in safe mode. and ls /root is shown below how to fix it ?? Does this happen always Or only at the beginning only when you start hadoop? If only at the beginning, then wait for sometime in order for NameNode to check if everything is okay before you access hdfs. If it's not leaving safemode after a considerable amount of time, that means there is some imbalance in the filesystem (e.g. under replicated or corrupted blocks). Under replicated blocks will be automatically balanced after some time. For corrupted blocks, you can have a look at output of this command: And try to delete corrupted blocks using: If this does not help, as suggested by @Nishu, use 这篇关于名称节点处于安全模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! hdfs fsck / -delete code
hdfs dfsadmin -safemode leave
命令强制使NameNode超出安全模式。一旦你这样做了,检查 hdfs dfsadmin -safemode get
的输出以确认safemode实际上是关闭的。hdfs fsck -list-corruptfileblocks
hdfs fsck / -delete
hdfs dfsadmin -safemode leave
command to get NameNode out of safemode forcefully. Once you do so, check the output of hdfs dfsadmin -safemode get
to confirm that safemode is actually turned off.