[ https://issues.apache.org/jira/browse/HADOOP-3911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630738#action_12630738 ]
lohit edited comment on HADOOP-3911 at 9/13/08 1:11 AM: ------------------------------------------------------------------- This was not happenning in 0.18 becuase GenericOptionsParser did not consider _-files_ to be a generic option. What seems to be happening here is that _-files_ which was used by fsck is being treated as an option for GenericOptionsParser. It might not be good idea to change _fsck's -files_ option now. I think making a check that is not the first argument works. Here is a patch for that. was (Author: lohit): This was not happenning in 0.18 becuase GenericOptionsParser did consider _-files_ to be a generic option. What seems to be happening here is that _-files_ which was used by fsck is being treated as an option for GenericOptionsParser. It might not be good idea to change _fsck's -files_ option now. I think making a check that is not the first argument works. Here is a patch for that. > ' -blocks ' option not being recognized > --------------------------------------- > > Key: HADOOP-3911 > URL: https://issues.apache.org/jira/browse/HADOOP-3911 > Project: Hadoop Core > Issue Type: Bug > Components: fs, util > Environment: branch-0.18 > Reporter: Koji Noguchi > Assignee: Lohit Vijayarenu > Priority: Minor > Attachments: HADOOP-3911.patch > > > Somehow depending on the order of options, GenericOptionsParser throws an > error. > This fail. > {noformat} > [EMAIL PROTECTED] tmp]$ ~/branch-0.18/bin/hadoop fsck > Usage: DFSck <path> [-move | -delete | -openforwrite] [-files [-blocks > [-locations | -racks]]] > [EMAIL PROTECTED] ~/branch-0.18/bin/hadoop fsck -files -blocks -locations > /user/knoguchi > java.io.FileNotFoundException: File -blocks does not exist. > at > org.apache.hadoop.util.GenericOptionsParser.validateFiles(GenericOptionsParser.java:278) > at > org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:233) > at > org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:315) > at > org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:134) > at > org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:119) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:59) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) > at org.apache.hadoop.dfs.DFSck.main(DFSck.java:137) > ...Status: HEALTHY > Total size: 2769 B > Total dirs: 4 > Total files: 3 > Total blocks (validated): 3 (avg. block size 923 B) > ... > {noformat} > This works. > {noformat} > [EMAIL PROTECTED] ~/branch-0.18/bin/hadoop fsck -blocks -locations -files > /user/knoguchi > /user/knoguchi/.Trash <dir> > /user/knoguchi/hod-logs <dir> > /user/knoguchi/hod-logs/____ <dir> > /user/knoguchi/hod-logs/____/aaa.tar.gz 1024 bytes, 1 block(s): OK > 0. blk_-5724352734215884188_0 len=1024 repl=3 [11.111.11.11:11111, > 22.22.22.22:11111, 33.33.33.33:11111] > ... > /user/knoguchi/mapredsystem <dir> > Status: HEALTHY > Total size: 2769 B > Total dirs: 4 > Total files: 3 > Total blocks (validated): 3 (avg. block size 923 B) > {noformat} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.