FAQ
GenericOptionsParser should parse generic options even if they appear after Tool-specific options
-------------------------------------------------------------------------------------------------

Key: HADOOP-5404
URL: https://issues.apache.org/jira/browse/HADOOP-5404
Project: Hadoop Core
Issue Type: Improvement
Components: util
Affects Versions: 0.19.1
Environment: All
Reporter: Milind Bhandarkar


Currently, when GenericOptionsParser encounters an unrecognized option, it stops processing command-line arguments, and returns the rest to the specific Tool. This forces users to remember the order of arguments, and leads to errors such as following:

org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option:
-Dmapred.reduce.tasks=4
at org.apache.commons.cli.Parser.processOption(Parser.java:368)
at org.apache.commons.cli.Parser.parse(Parser.java:185)
at org.apache.commons.cli.Parser.parse(Parser.java:70)
at
MyTool.run(MyTool.java.java:290)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at
MyTool.main(MyTool.java:19)

In Hadoop-streaming as well, -D parameters should appear before streaming-specific arguments, such as -mapper, -reducer etc.

If GenericOptionsParser were to scan the entire command-line, ignoring unrecognized (tool-specific) options, and returning all unrecognized options back to the tool, this problem would be solved.


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Search Discussions

  • Milind Bhandarkar (JIRA) at Mar 13, 2009 at 7:27 pm
    [ https://issues.apache.org/jira/browse/HADOOP-5404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681869#action_12681869 ]

    Milind Bhandarkar commented on HADOOP-5404:
    -------------------------------------------

    In addition, multiple -files options fail. Thus,

    -files file1,file2 works

    but

    -files file1 -files file2 does not.

    -files should be similar to -D, which can be used multiple times. Haven't checked -archives and -libjars. But they too, should be allowed multiple times.
    GenericOptionsParser should parse generic options even if they appear after Tool-specific options
    -------------------------------------------------------------------------------------------------

    Key: HADOOP-5404
    URL: https://issues.apache.org/jira/browse/HADOOP-5404
    Project: Hadoop Core
    Issue Type: Improvement
    Components: util
    Affects Versions: 0.19.1
    Environment: All
    Reporter: Milind Bhandarkar

    Currently, when GenericOptionsParser encounters an unrecognized option, it stops processing command-line arguments, and returns the rest to the specific Tool. This forces users to remember the order of arguments, and leads to errors such as following:
    org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option:
    -Dmapred.reduce.tasks=4
    at org.apache.commons.cli.Parser.processOption(Parser.java:368)
    at org.apache.commons.cli.Parser.parse(Parser.java:185)
    at org.apache.commons.cli.Parser.parse(Parser.java:70)
    at
    MyTool.run(MyTool.java.java:290)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at
    MyTool.main(MyTool.java:19)
    In Hadoop-streaming as well, -D parameters should appear before streaming-specific arguments, such as -mapper, -reducer etc.
    If GenericOptionsParser were to scan the entire command-line, ignoring unrecognized (tool-specific) options, and returning all unrecognized options back to the tool, this problem would be solved.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedMar 5, '09 at 1:02a
activeMar 13, '09 at 7:27p
posts2
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Milind Bhandarkar (JIRA): 2 posts

People

Translate

site design / logo © 2022 Grokbase