[
https://issues.apache.org/jira/browse/HDFS-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848979#action_12848979
]
André Oriani commented on HDFS-1032:
------------------------------------
Current code decides the exit code of fsck based of the last line of output of
that command , more precisely whether it ends with CORRUPT_STATUS or
HEALTHY_STATUS. I decided to stick to that approach by returning the first if
some corrupt file reported by NameNode.getCorruptFiles() matches the pathprefix
and returning the last if otherwise.
I did the folow test. I delete all blocks and waited some time.
*fsck /* reported : "The filesystem under `/` is *CORRUPT*"
*fsck / -corruptfiles* reported : "The are x corrupt files under `/` which is
*CORRUPT*"
Then I stop HDFS and started it again. HDFS started and kept itself on safe
mode. In that situation NameNode.getCorruptFiles() did not return any files.
So,
*fsck /* reported : "The filesystem under `/` is *CORRUPT*"
*fsck / -corruptfiles* reported : "The are no corrupt files under `/` which is
*HEALTHY*"
Is this a problem ?
> Extend DFSck with an option to list corrupt files using API from HDFS-729
> -------------------------------------------------------------------------
>
> Key: HDFS-1032
> URL: https://issues.apache.org/jira/browse/HDFS-1032
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: tools
> Reporter: Rodrigo Schmidt
> Assignee: André Oriani
> Attachments: hdfs-1032_aoriani.patch, hdfs-1032_aoriani_2.patch,
> hdfs-1032_aoriani_3.patch
>
>
> HDFS-729 created a new API to namenode that returns the list of corrupt files.
> We can now extend fsck (DFSck.java) to add an option (e.g. --list_corrupt)
> that queries the namenode using the new API and lists the corrupt blocks to
> the users.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.