集群的一些问题

牧云@^-^@ 提交于 2020-01-09 05:00:44

 Web页面出现一些错误:

namenode 出现 missing blocks的解决方案

There are 2 missing blocks. The following files may be corrupted:

blk_1078468526 /user/spark/sparkstreamingcheckpoint/checkpoint-1517487380000
blk_1078468528 /user/spark/sparkstreamingcheckpoint/checkpoint-1517487400000

Please check the logs or run fsck in order to identify the missing blocks. See the Hadoop FAQ for common causes and potential solutions.

通过 hdfs dfs -cat  /user/spark/sparkstreamingcheckpoint/checkpoint-1517487380000 发现确实有两个blocks丢失

这两个blocks的两个副本都丢失了,所以才导致hdfs发出这个警告。

数据已经无法恢复,只能通过命令删除元数据来消除警告。

hdfs dfs -rm -r -f  /user/spark/sparkstreamingcheckpoint/checkpoint-*

一旦出现这种情况,数据基本无法恢复,所以配置HDFS的副本数时尽可能3个以上。


 

 

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