[
https://issues.apache.org/jira/browse/HDFS-15009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16980095#comment-16980095
]
Fei Hui commented on HDFS-15009:
--------------------------------
[~hemanthboyina] Thanks for reporting this. [~ayushtkn]Thanks for involving me.
There is a problem here,it is reproduced easily
The log as following,
{quote}
bin/hdfs fsck /tmp/test10 -list-corruptfileblocks
Connecting to namenode via
http://xx.xx.xx.xx:50070/fsck?ugi=hadoop&listcorruptfileblocks=1&path=%2Ftmp%2Ftest10
The list of corrupt files under path '/tmp/test10' are:
blk_1079564638 /tmp/test10/hosts
The filesystem under path '/tmp/test10' has 1 CORRUPT files
bin/hdfs fsck /tmp/test1 -list-corruptfileblocks
Connecting to namenode via
http://xx.xx.xx.xx:50070/fsck?ugi=hadoop&listcorruptfileblocks=1&path=%2Ftmp%2Ftest1
The list of corrupt files under path '/tmp/test1' are:
blk_1079564638 /tmp/test10/hosts
The filesystem under path '/tmp/test1' has 1 CORRUPT files
bin/hdfs fsck -blockId blk_1079564638
Connecting to namenode via
http://xx.xx.xx.xx:50070/fsck?ugi=hadoop&blockId=blk_1079564638+&path=%2F
Block Id: blk_1079564638
Block belongs to: /tmp/test10/hosts
No. of Expected Replica: 3
No. of live Replica: 0
No. of excess Replica: 0
No. of stale Replica: 0
No. of decommissioned Replica: 0
No. of decommissioning Replica: 0
No. of corrupted Replica: 0
{quote}
> FSCK "-list-corruptfileblocks" return Invalid Entries
> -----------------------------------------------------
>
> Key: HDFS-15009
> URL: https://issues.apache.org/jira/browse/HDFS-15009
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: hemanthboyina
> Assignee: hemanthboyina
> Priority: Major
>
> Scenario : if we have two directories dir1, dir10 and only dir10 have
> corrupt files
> Now if we run -list-corruptfileblocks for dir1, corrupt files count for dir1
> showing is of dir10
> {code:java}
> while (blkIterator.hasNext()) {
> BlockInfo blk = blkIterator.next();
> final INodeFile inode = getBlockCollection(blk);
> skip++;
> if (inode != null) {
> String src = inode.getFullPathName();
> if (src.startsWith(path)){
> corruptFiles.add(new CorruptFileBlockInfo(src, blk));
> count++;
> if (count >= DEFAULT_MAX_CORRUPT_FILEBLOCKS_RETURNED)
> break;
> }
> }
> } {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]