前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Hadoop之check the logs or run fsck in order to identify the missing blocks

Hadoop之check the logs or run fsck in order to identify the missing blocks

作者头像
克虏伯
发布2020-03-26 18:04:13
2.4K0
发布2020-03-26 18:04:13
举报

? ? hadoop版本是2.8.3

? ? 今天发现有奇怪的问题,如下List-1所示,提示有俩个文件块丢失

List-1

代码语言:javascript
复制
There are 2 missing blocks. The following files may be corrupted:

blk_1073857294	/tmp/xxx/b9a11fe8-306a-42cc-b49f-2a7f098ecb5a/hive-exec-2.1.1.jar
blk_1073857295	/tmp/xxx/b9a11fe8-306a-42cc-b49f-2a7f098ecb5a/hive-
hcatalog-core-3.0.0.jar

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

? ? 由于是/tmp目录下,不是正常的业务数据,我们直接删除,如下List-2,之后再去看hdfs的页面,无此问题了。

List-2

代码语言:javascript
复制
[xx@xxx hadoop]# hadoop  fsck -delete
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

Connecting to namenode via http://xxxx:50070/fsck?ugi=root&delete=1&path=%2F
FSCK started by root (auth:SIMPLE) from /10.42.5.26 for path / at Wed Mar 25 12:35:39 CST 2020
..............................................................................
/tmp/xxx/b9a11fe8-306a-42cc-b49f-2a7f098ecb5a/hive-exec-2.1.1.jar: CORRUPT blockpool BP-604784226-10.42.1.102-1577681916881 block blk_1073857294

/tmp/xxx/b9a11fe8-306a-42cc-b49f-2a7f098ecb5a/hive-exec-2.1.1.jar: MISSING 1 blocks of total size 32441258 B..
/tmp/xxx/b9a11fe8-306a-42cc-b49f-2a7f098ecb5a/hive-hcatalog-core-3.0.0.jar: CORRUPT blockpool BP-604784226-10.42.1.102-1577681916881 block blk_1073857295

/tmp/xxx/b9a11fe8-306a-42cc-b49f-2a7f098ecb5a/hive-hcatalog-core-3.0.0.jar: MISSING 1 blocks of total size 269009 B......................
...

? ? 原因分析:?

? ? 数据是按blk_1073857294、blk_1073857295方式存储在hdfs上的,删除了blk_1073857294、blk_1073857295后,元数据还在,但是数据块不在了,才报的这个错,但是这部分数据其实我不需要了,所以就直接把出异常的文件块的元数据信息也删除就可以了。

Reference

1.https://blog.csdn.net/lsr40/article/details/79426333

本文参与?腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客?前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与?腾讯云自媒体分享计划? ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Reference
相关产品与服务
大数据
全栈大数据产品,面向海量数据场景,帮助您 “智理无数,心中有数”!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
http://www.vxiaotou.com