Hadoop Common
  1. Hadoop Common
  2. HADOOP-6482

GenericOptionsParser constructor that takes Options and String[] ignores options

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: util
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      This constructor:

      public GenericOptionsParser(Options opts, String[] args)

      { this(new Configuration(), new Options(), args); }

      should do a this(new Configuration(), opts, args)

      1. hadoop-6482-1.patch
        3 kB
        Eli Collins
      2. hadoop-6482-2.patch
        4 kB
        Eli Collins

        Activity

        Hide
        Eli Collins added a comment -

        Patch attached. Fixes this and adds a test.

        Not sure why users need to pass in generic options to GenericOptionsParser given that we hard-code the hadoop options, but at least this fix will allow us to pull the hadoop-specific options out of this class.

        Show
        Eli Collins added a comment - Patch attached. Fixes this and adds a test. Not sure why users need to pass in generic options to GenericOptionsParser given that we hard-code the hadoop options, but at least this fix will allow us to pull the hadoop-specific options out of this class.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12450655/hadoop-6482-1.patch
        against trunk revision 979919.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 javadoc. The javadoc tool appears to have generated 1 warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/643/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/643/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/643/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/643/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12450655/hadoop-6482-1.patch against trunk revision 979919. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 javadoc. The javadoc tool appears to have generated 1 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/643/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/643/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/643/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/643/console This message is automatically generated.
        Hide
        Eli Collins added a comment -

        javadoc warnings are due to HADOOP-6885.

        Show
        Eli Collins added a comment - javadoc warnings are due to HADOOP-6885 .
        Hide
        Eli Collins added a comment -

        Updated the patch to include a test that shows that GenericOptionsParser will use multiple -conf arguments. This is required when using GenericOptionsParser to create a Configuration using multiple configuration files (ie post project split).

        Show
        Eli Collins added a comment - Updated the patch to include a test that shows that GenericOptionsParser will use multiple -conf arguments. This is required when using GenericOptionsParser to create a Configuration using multiple configuration files (ie post project split).
        Hide
        Jakob Homan added a comment -

        +1. Modified method is private, so not an incompatible change.

        Show
        Jakob Homan added a comment - +1. Modified method is private, so not an incompatible change.
        Hide
        Jakob Homan added a comment -

        I've committed this. Resolving as fixed. Thanks, Chris and Eli.

        Show
        Jakob Homan added a comment - I've committed this. Resolving as fixed. Thanks, Chris and Eli.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #361 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/361/)
        HADOOP-6482. GenericOptionsParser constructor that takes Options and String[] ignores options. Contributed by Eli Collins.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #361 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/361/ ) HADOOP-6482 . GenericOptionsParser constructor that takes Options and String[] ignores options. Contributed by Eli Collins.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #428 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/428/)
        HADOOP-6482. GenericOptionsParser constructor that takes Options and String[] ignores options. Contributed by Eli Collins.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #428 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/428/ ) HADOOP-6482 . GenericOptionsParser constructor that takes Options and String[] ignores options. Contributed by Eli Collins.

          People

          • Assignee:
            Eli Collins
            Reporter:
            Chris Wilkes
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5m
              5m
              Remaining:
              Remaining Estimate - 5m
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development