hadoop + 具有损坏副本的块

问题描述

我们有带有 ambari 平台的 HDP 集群版本 2.6.4

从 ambari 仪表板我们可以看到带有 1 的损坏副本的块

enter image description here

也来自

$ hdfs dfsadmin -report
Configured Capacity: 57734285504512 (52.51 TB)
Present Capacity: 55002945909856 (50.02 TB)
DFS Remaining: 29594344477833 (26.92 TB)
DFS Used: 25408601432023 (23.11 TB)
DFS Used%: 46.19%
Under replicated blocks: 0
Blocks with corrupt replicas: 1    <-----------------
Missing blocks: 0
Missing blocks (with replication factor 1): 0

为了找到损坏的文件,我们执行以下操作

$ hdfs fsck -list-corruptfileblocks
Connecting to namenode via http://master.sys76.com:50070/fsck?ugi=hdfs&listcorruptfileblocks=1&path=%2F
The filesystem under path '/' has 0 CORRUPT files

但正如我们在上面看到的,我们没有找到文件

我们也做了以下操作来删除损坏的文件

 hdfs fsck / -delete

但仍然 Blocks with corrupt replicas 仍然是 1

有什么建议吗?

解决方法

考虑到副本和块是两个不同的概念。

尝试使用命令:

hdfs fsck / | egrep -v '^\.+'

了解更多关于异常块的信息。