Details

    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.0.3
    • Fix Version/s: None
    • Component/s: mrv1
    • Labels:
      None

      Description

      The javadocs in org.apache.hadoop.util.Tool contain an example to use the tool runner to invoke a tool.

      If you copy and paste the example into a java file it doesn't even compile

      1. job.setInputPath() isn't there
      2. job.setOutputPath() isn't there
      3. job.waitForCompletion() isn't invoked
      4. the Tool.run() implementation doesn't contain a return statement.

      The processed javadocs are online: http://hadoop.apache.org/common/docs/r1.0.3/api/org/apache/hadoop/util/Tool.html

        Activity

        Hide
        Gergely Novák added a comment -

        Submitted a patch with an updated example code that does compile on trunk.

        Show
        Gergely Novák added a comment - Submitted a patch with an updated example code that does compile on trunk.
        Hide
        Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 16s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        +1 mvninstall 9m 10s trunk passed
        +1 compile 9m 0s trunk passed with JDK v1.8.0_92
        +1 compile 7m 20s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 20s trunk passed
        +1 mvnsite 0m 59s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        +1 findbugs 1m 36s trunk passed
        +1 javadoc 1m 0s trunk passed with JDK v1.8.0_92
        +1 javadoc 1m 10s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 45s the patch passed
        +1 compile 8m 22s the patch passed with JDK v1.8.0_92
        +1 javac 8m 22s the patch passed
        +1 compile 7m 27s the patch passed with JDK v1.7.0_95
        +1 javac 7m 27s the patch passed
        +1 checkstyle 0m 19s the patch passed
        +1 mvnsite 0m 58s the patch passed
        +1 mvneclipse 0m 13s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 55s the patch passed
        +1 javadoc 1m 3s the patch passed with JDK v1.8.0_92
        +1 javadoc 1m 8s the patch passed with JDK v1.7.0_95
        +1 unit 10m 5s hadoop-common in the patch passed with JDK v1.8.0_92.
        +1 unit 9m 48s hadoop-common in the patch passed with JDK v1.7.0_95.
        +1 asflicense 0m 23s Patch does not generate ASF License warnings.
        74m 39s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:fbe3e86
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12801015/MAPREDUCE-4285.001.patch
        JIRA Issue MAPREDUCE-4285
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 1f45954be186 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 66b07d8
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_92 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6463/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6463/console
        Powered by Apache Yetus 0.2.0 http://yetus.apache.org

        This message was automatically generated.

        Show
        Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 16s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 9m 10s trunk passed +1 compile 9m 0s trunk passed with JDK v1.8.0_92 +1 compile 7m 20s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 20s trunk passed +1 mvnsite 0m 59s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 36s trunk passed +1 javadoc 1m 0s trunk passed with JDK v1.8.0_92 +1 javadoc 1m 10s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 45s the patch passed +1 compile 8m 22s the patch passed with JDK v1.8.0_92 +1 javac 8m 22s the patch passed +1 compile 7m 27s the patch passed with JDK v1.7.0_95 +1 javac 7m 27s the patch passed +1 checkstyle 0m 19s the patch passed +1 mvnsite 0m 58s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 55s the patch passed +1 javadoc 1m 3s the patch passed with JDK v1.8.0_92 +1 javadoc 1m 8s the patch passed with JDK v1.7.0_95 +1 unit 10m 5s hadoop-common in the patch passed with JDK v1.8.0_92. +1 unit 9m 48s hadoop-common in the patch passed with JDK v1.7.0_95. +1 asflicense 0m 23s Patch does not generate ASF License warnings. 74m 39s Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12801015/MAPREDUCE-4285.001.patch JIRA Issue MAPREDUCE-4285 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 1f45954be186 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 66b07d8 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_92 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6463/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6463/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        Gergely Novák added a comment -

        I can't see how to create a new unit test for this.

        Manual steps to verify the patch:

        • Generate javadoc with mvn javadoc:javadoc
        • Check hadoop-common-project/hadoop-common/target/site/api/org/apache/hadoop/util/Tool.html
        • Check that the code in the comment works
          • I created a sample MapReduce project with this code copy-pasted
          • The MyMapper and MyReducer classes were simple subclasses of Mapper and Reducer
          • Compiled and ran the program - it worked as expected
        Show
        Gergely Novák added a comment - I can't see how to create a new unit test for this. Manual steps to verify the patch: Generate javadoc with mvn javadoc:javadoc Check hadoop-common-project/hadoop-common/target/site/api/org/apache/hadoop/util/Tool.html Check that the code in the comment works I created a sample MapReduce project with this code copy-pasted The MyMapper and MyReducer classes were simple subclasses of Mapper and Reducer Compiled and ran the program - it worked as expected

          People

          • Assignee:
            Gergely Novák
            Reporter:
            Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development