[ 
https://issues.apache.org/jira/browse/HDFS-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849575#action_12849575
 ] 

André Oriani commented on HDFS-1032:
------------------------------------

I am concerned how to handle the exit code of fsck 


{code:title=DFSck.java|borderStyle=solid}

public int run(String[] args) throws IOException {
...
if (lastLine.endsWith(NamenodeFsck.HEALTHY_STATUS)) {
      errCode = 0;
    } else if (lastLine.endsWith(NamenodeFsck.CORRUPT_STATUS)) {
      errCode = 1;
    } else if (lastLine.endsWith(NamenodeFsck.NONEXISTENT_STATUS)) {
      errCode = 0;
    }
    return errCode;
...
{code}

The proposed output does not have any "ending tag" like the current possible 
outputs. Would a "else { errCode =0; }' be okay ?

And what your opinions about the follow proposed help usage for the new option:
_prints out a list of alleged corrupt files limited to a maximum defined by the 
dfs.corruptfilesreturned.max property_



> 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.

Reply via email to