Hadoop safemode recovery - taking too long!

穿精又带淫゛_ 提交于 2019-12-02 17:08:40

I had it once, where some blocks were never reported in. I had to forcefully let the namenode leave safemode (hadoop dfsadmin -safemode leave) and then run an fsck to delete missing files.

Check the properties dfs.namenode.handler.count in hdfs-site.xml.

dfs.namenode.handler.count in hdfs-site.xml specifies the number of threads used by Namenode for it’s processing. its default value is 10. Too low value of this properties might cause the issue specified.

Also check the missing or corrupt blocks hdfs fsck / | egrep -v '^.+$' | grep -v replica

hdfs fsck /path/to/corrupt/file -locations -blocks -files

if the corrupt blocks are found, remove it. hdfs fs -rm /file-with-missing-corrupt blocks.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!