Hadoop Common
  1. Hadoop Common
  2. HADOOP-3417

JobClient should not have a static configuration for cli parsing

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.17.0
    • Fix Version/s: 0.18.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Hide
      Removed the public class org.apache.hadoop.mapred.JobShell.
      Command line options -libjars, -files and -archives are moved to GenericCommands. Thus applications have to implement org.apache.hadoop.util.Tool to use the options.
      Show
      Removed the public class org.apache.hadoop.mapred.JobShell. Command line options -libjars, -files and -archives are moved to GenericCommands. Thus applications have to implement org.apache.hadoop.util.Tool to use the options.

      Description

      HADOOP-1622 introduced a static configuration variable into JobClient that prevents it from being used by multiple threads. Furthermore, the cli processing that HADOOP-1622 added should be in the GenericOptionParser instead of JobShell so that all of the implementations of Tool can use them.

      1. patch-3417.txt
        30 kB
        Amareshwari Sriramadasu

        Activity

        Hide
        Amareshwari Sriramadasu added a comment -

        Here is a patch doing the following:

        1. Removes the static configuration variable, commandLineConfig from JobClient.
        2. Moves the cli parsing from JobShell to GenericOptionsParser. Thus removes the class org.apache.hadoop.mapred.JobShell .
        3. Refactors TestJobShell as TestCommandLineJobSubmission, which tests the command line options -files, -libjars
        4. testshell.ExternalMapReduce class is modified to implement org.apache.hadoop.util.Tool, sothat it can be run from ToolRunner.

        Show
        Amareshwari Sriramadasu added a comment - Here is a patch doing the following: 1. Removes the static configuration variable, commandLineConfig from JobClient. 2. Moves the cli parsing from JobShell to GenericOptionsParser. Thus removes the class org.apache.hadoop.mapred.JobShell . 3. Refactors TestJobShell as TestCommandLineJobSubmission, which tests the command line options -files, -libjars 4. testshell.ExternalMapReduce class is modified to implement org.apache.hadoop.util.Tool, sothat it can be run from ToolRunner.
        Hide
        Mahadev konar added a comment -

        +1 looks good.
        Only one thing – the test (which is my fault) creates a file files_tmp in the workspace of hadoop (the top level dir of hadoop) – there is a bug filed to fix that. If you can fix that as a part of this patch, that would be great – or else i will fix it.
        http://issues.apache.org/jira/browse/HADOOP-3240 is the issue for this problem.

        Show
        Mahadev konar added a comment - +1 looks good. Only one thing – the test (which is my fault) creates a file files_tmp in the workspace of hadoop (the top level dir of hadoop) – there is a bug filed to fix that. If you can fix that as a part of this patch, that would be great – or else i will fix it. http://issues.apache.org/jira/browse/HADOOP-3240 is the issue for this problem.
        Hide
        Amareshwari Sriramadasu added a comment -

        trying to run hudson again

        Show
        Amareshwari Sriramadasu added a comment - trying to run hudson again
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12382910/patch-3417.txt
        against trunk revision 661918.

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

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

        +1 javadoc. The javadoc tool did not generate any 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/2533/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2533/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2533/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2533/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/12382910/patch-3417.txt against trunk revision 661918. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 16 new or modified tests. +1 javadoc. The javadoc tool did not generate any 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/2533/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2533/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2533/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2533/console This message is automatically generated.
        Hide
        Devaraj Das added a comment -

        I just committed this. Thanks, Amareshwari!

        Show
        Devaraj Das added a comment - I just committed this. Thanks, Amareshwari!
        Hide
        Mahadev konar added a comment -

        the commit missed to svn add a new file (a test case) in the patch. That is TestCommandLineJobbSubmission.java.

        Can you fix it devaraj?

        Show
        Mahadev konar added a comment - the commit missed to svn add a new file (a test case) in the patch. That is TestCommandLineJobbSubmission.java. Can you fix it devaraj?

          People

          • Assignee:
            Amareshwari Sriramadasu
            Reporter:
            Owen O'Malley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development