hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-1727) fsck command can display command usage if user passes any illegal argument
Date Wed, 25 May 2011 17:00:49 GMT

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

Todd Lipcon commented on HDFS-1727:

A few comments:
- I think the {{null == dir}} check needs an {{else}} clause that prints an error that only
one path may be passed. That is to say, if you run "hadoop fsck /foo /bar", it should print
an error rather than ignoring /bar.
- To make the tests run faster, I think it would be better for the two test cases to be combined
and share the same MiniDFSCluster.
- The test case would be easier to follow if you used an argument like "-asdfjisadfijs" or
"-thisIsNotAValidFlag" instead of "-listcorruptfileblocks".
- The error message could be formatted nicer. Instead of "Invalid arguments passed 'foo'"
I would use the same formatting as the FsShell errors - ie "fsck: Illegal option 'foo'"

> fsck command can display command usage if user passes any illegal argument
> --------------------------------------------------------------------------
>                 Key: HDFS-1727
>                 URL: https://issues.apache.org/jira/browse/HDFS-1727
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.20.1, 0.23.0
>            Reporter: Uma Maheswara Rao G
>            Priority: Minor
>         Attachments: HDFS-1727.patch
> In fsck command if user passes the arguments like
> ./hadoop fsck -test -files -blocks -racks
> In this case it will take / and will display whole DFS information regarding to files,blocks,racks.
> But here, we are hiding the user mistake. Instead of this, we can display the command
usage if user passes any invalid argument like above.
> If user passes illegal optional arguments like
> ./hadoop fsck /test -listcorruptfileblocks instead of
> ./hadoop fsck /test -list-corruptfileblocks also we can display the proper command usage

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message