Hadoop Common
  1. Hadoop Common
  2. HADOOP-6215

fix GenericOptionParser to deal with -D with '=' in the value

    Details

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

      Description

      Currently the code ignores any -D option that has a "=" in the value. This is clearly wrong.
      In particular, -Dx=y=z should work and assign "y=z" to "x". This is a regression from HADOOP-6213.

      1. HADOOP-6215-v1.0.patch
        1 kB
        Amar Kamat
      2. HADOOP-6215-v1.0-branch-0.20.patch
        1 kB
        Amar Kamat

        Activity

        Hide
        Amar Kamat added a comment -

        The patch in HADOOP-6213 makes GenericOptionsParser same as in commons-trunk. We can fix both here.

        Show
        Amar Kamat added a comment - The patch in HADOOP-6213 makes GenericOptionsParser same as in commons-trunk. We can fix both here.
        Hide
        Amar Kamat added a comment -

        Attaching a patch for commons and branch 0.20. Testing in progress.

        Show
        Amar Kamat added a comment - Attaching a patch for commons and branch 0.20. Testing in progress.
        Hide
        Amar Kamat added a comment -

        Result of test-patch
        [exec] +1 overall.
        [exec]
        [exec] +1 @author. The patch does not contain any @author tags.
        [exec]
        [exec] +1 tests included. The patch appears to include 3 new or modified tests.
        [exec]
        [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
        [exec]
        [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
        [exec]
        [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
        [exec]
        [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.

        Ant tests passed on my box.

        Show
        Amar Kamat added a comment - Result of test-patch [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. Ant tests passed on my box.
        Hide
        Amar Kamat added a comment -

        Testing on branch 20

        Show
        Amar Kamat added a comment - Testing on branch 20
        Hide
        Amar Kamat added a comment -

        All core tests except TestDistributedFileSystem and TestReduceFetch failed on core.
        All contrib tests except TestStreamingExitStatus, TestJobInitialization and TestQueueCapacities passed.

        Show
        Amar Kamat added a comment - All core tests except TestDistributedFileSystem and TestReduceFetch failed on core. All contrib tests except TestStreamingExitStatus, TestJobInitialization and TestQueueCapacities passed.
        Hide
        Sharad Agarwal added a comment -

        +1 I committed to trunk and branch 20. Thanks Amar!

        Show
        Sharad Agarwal added a comment - +1 I committed to trunk and branch 20. Thanks Amar!
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/2/)
        . fix GenericOptionParser to deal with -D with '=' in the value. Contributed by Amar Kamat.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/2/ ) . fix GenericOptionParser to deal with -D with '=' in the value. Contributed by Amar Kamat.
        Hide
        Amar Kamat added a comment -

        Note that this is not a regression caused because of HADOOP-6213. I tested the code pre-H6213 and found that "-D x=y=z" throws parse-exception.

        Show
        Amar Kamat added a comment - Note that this is not a regression caused because of HADOOP-6213 . I tested the code pre-H6213 and found that "-D x=y=z" throws parse-exception.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #77 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/77/)
        . fix GenericOptionParser to deal with -D with '=' in the value. Contributed by Amar Kamat.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #77 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/77/ ) . fix GenericOptionParser to deal with -D with '=' in the value. Contributed by Amar Kamat.

          People

          • Assignee:
            Amar Kamat
            Reporter:
            Owen O'Malley
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development