Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 2.9.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Since the new target version if Java is 7, it would be great if JobClient could implement the java.lang.AutoClosable interface, so that it can be used in try-with-ressource statements. See here: https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html

      1. mapreduce6431.001.patch
        1 kB
        Haibo Chen
      2. mapreduce6431.002.patch
        2 kB
        Haibo Chen

        Activity

        Hide
        haibochen Haibo Chen added a comment -

        Here is the patch.

        Show
        haibochen Haibo Chen added a comment - Here is the patch.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s 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 7m 10s trunk passed
        +1 compile 0m 24s trunk passed with JDK v1.8.0_66
        +1 compile 0m 25s trunk passed with JDK v1.7.0_91
        +1 checkstyle 0m 19s trunk passed
        +1 mvnsite 0m 33s trunk passed
        +1 mvneclipse 0m 14s trunk passed
        -1 findbugs 1m 11s hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core in trunk has 2 extant Findbugs warnings.
        +1 javadoc 0m 22s trunk passed with JDK v1.8.0_66
        +1 javadoc 0m 27s trunk passed with JDK v1.7.0_91
        +1 mvninstall 0m 26s the patch passed
        +1 compile 0m 19s the patch passed with JDK v1.8.0_66
        +1 javac 0m 19s the patch passed
        +1 compile 0m 23s the patch passed with JDK v1.7.0_91
        +1 javac 0m 23s the patch passed
        +1 checkstyle 0m 16s the patch passed
        +1 mvnsite 0m 31s the patch passed
        +1 mvneclipse 0m 11s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 22s the patch passed
        +1 javadoc 0m 20s the patch passed with JDK v1.8.0_66
        +1 javadoc 0m 24s the patch passed with JDK v1.7.0_91
        +1 unit 1m 55s hadoop-mapreduce-client-core in the patch passed with JDK v1.8.0_66.
        +1 unit 2m 18s hadoop-mapreduce-client-core in the patch passed with JDK v1.7.0_91.
        +1 asflicense 0m 22s Patch does not generate ASF License warnings.
        21m 0s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12784713/mapreduce6431.001.patch
        JIRA Issue MAPREDUCE-6431
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 999188dab4a2 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 / fb238d7
        Default Java 1.7.0_91
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91
        findbugs v3.0.0
        findbugs https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6290/artifact/patchprocess/branch-findbugs-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-core-warnings.html
        JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6290/testReport/
        modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core
        Max memory used 76MB
        Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org
        Console output https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6290/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s 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 7m 10s trunk passed +1 compile 0m 24s trunk passed with JDK v1.8.0_66 +1 compile 0m 25s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 19s trunk passed +1 mvnsite 0m 33s trunk passed +1 mvneclipse 0m 14s trunk passed -1 findbugs 1m 11s hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core in trunk has 2 extant Findbugs warnings. +1 javadoc 0m 22s trunk passed with JDK v1.8.0_66 +1 javadoc 0m 27s trunk passed with JDK v1.7.0_91 +1 mvninstall 0m 26s the patch passed +1 compile 0m 19s the patch passed with JDK v1.8.0_66 +1 javac 0m 19s the patch passed +1 compile 0m 23s the patch passed with JDK v1.7.0_91 +1 javac 0m 23s the patch passed +1 checkstyle 0m 16s the patch passed +1 mvnsite 0m 31s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 22s the patch passed +1 javadoc 0m 20s the patch passed with JDK v1.8.0_66 +1 javadoc 0m 24s the patch passed with JDK v1.7.0_91 +1 unit 1m 55s hadoop-mapreduce-client-core in the patch passed with JDK v1.8.0_66. +1 unit 2m 18s hadoop-mapreduce-client-core in the patch passed with JDK v1.7.0_91. +1 asflicense 0m 22s Patch does not generate ASF License warnings. 21m 0s Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12784713/mapreduce6431.001.patch JIRA Issue MAPREDUCE-6431 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 999188dab4a2 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 / fb238d7 Default Java 1.7.0_91 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91 findbugs v3.0.0 findbugs https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6290/artifact/patchprocess/branch-findbugs-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-core-warnings.html JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6290/testReport/ modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core Max memory used 76MB Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6290/console This message was automatically generated.
        Hide
        haibochen Haibo Chen added a comment -

        added unit test for autoclosable interface

        Show
        haibochen Haibo Chen added a comment - added unit test for autoclosable interface
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        0 mvndep 0m 15s Maven dependency ordering for branch
        +1 mvninstall 6m 52s trunk passed
        +1 compile 2m 7s trunk passed with JDK v1.8.0_66
        +1 compile 1m 55s trunk passed with JDK v1.7.0_91
        +1 checkstyle 0m 26s trunk passed
        +1 mvnsite 0m 57s trunk passed
        +1 mvneclipse 0m 26s trunk passed
        -1 findbugs 1m 16s hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core in trunk has 2 extant Findbugs warnings.
        +1 javadoc 0m 44s trunk passed with JDK v1.8.0_66
        +1 javadoc 1m 0s trunk passed with JDK v1.7.0_91
        0 mvndep 0m 18s Maven dependency ordering for patch
        +1 mvninstall 0m 45s the patch passed
        +1 compile 1m 28s the patch passed with JDK v1.8.0_66
        +1 javac 1m 28s the patch passed
        +1 compile 1m 45s the patch passed with JDK v1.7.0_91
        +1 javac 1m 45s the patch passed
        +1 checkstyle 0m 25s the patch passed
        +1 mvnsite 0m 55s the patch passed
        +1 mvneclipse 0m 22s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 2m 27s the patch passed
        +1 javadoc 0m 36s the patch passed with JDK v1.8.0_66
        +1 javadoc 0m 47s the patch passed with JDK v1.7.0_91
        -1 unit 1m 54s hadoop-mapreduce-client-core in the patch failed with JDK v1.8.0_66.
        +1 unit 0m 38s hadoop-mapreduce-client-common in the patch passed with JDK v1.8.0_66.
        +1 unit 2m 10s hadoop-mapreduce-client-core in the patch passed with JDK v1.7.0_91.
        +1 unit 0m 45s hadoop-mapreduce-client-common in the patch passed with JDK v1.7.0_91.
        +1 asflicense 0m 20s Patch does not generate ASF License warnings.
        33m 45s



        Reason Tests
        JDK v1.8.0_66 Failed junit tests hadoop.mapreduce.tools.TestCLI



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12784755/mapreduce6431.002.patch
        JIRA Issue MAPREDUCE-6431
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 1e85b7f0bfc5 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 / 8a91109
        Default Java 1.7.0_91
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91
        findbugs v3.0.0
        findbugs https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/artifact/patchprocess/branch-findbugs-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-core-warnings.html
        unit https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-core-jdk1.8.0_66.txt
        unit test logs https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-core-jdk1.8.0_66.txt
        JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/testReport/
        modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common U: hadoop-mapreduce-project/hadoop-mapreduce-client
        Max memory used 77MB
        Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org
        Console output https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. 0 mvndep 0m 15s Maven dependency ordering for branch +1 mvninstall 6m 52s trunk passed +1 compile 2m 7s trunk passed with JDK v1.8.0_66 +1 compile 1m 55s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 26s trunk passed +1 mvnsite 0m 57s trunk passed +1 mvneclipse 0m 26s trunk passed -1 findbugs 1m 16s hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core in trunk has 2 extant Findbugs warnings. +1 javadoc 0m 44s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 0s trunk passed with JDK v1.7.0_91 0 mvndep 0m 18s Maven dependency ordering for patch +1 mvninstall 0m 45s the patch passed +1 compile 1m 28s the patch passed with JDK v1.8.0_66 +1 javac 1m 28s the patch passed +1 compile 1m 45s the patch passed with JDK v1.7.0_91 +1 javac 1m 45s the patch passed +1 checkstyle 0m 25s the patch passed +1 mvnsite 0m 55s the patch passed +1 mvneclipse 0m 22s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 27s the patch passed +1 javadoc 0m 36s the patch passed with JDK v1.8.0_66 +1 javadoc 0m 47s the patch passed with JDK v1.7.0_91 -1 unit 1m 54s hadoop-mapreduce-client-core in the patch failed with JDK v1.8.0_66. +1 unit 0m 38s hadoop-mapreduce-client-common in the patch passed with JDK v1.8.0_66. +1 unit 2m 10s hadoop-mapreduce-client-core in the patch passed with JDK v1.7.0_91. +1 unit 0m 45s hadoop-mapreduce-client-common in the patch passed with JDK v1.7.0_91. +1 asflicense 0m 20s Patch does not generate ASF License warnings. 33m 45s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.mapreduce.tools.TestCLI Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12784755/mapreduce6431.002.patch JIRA Issue MAPREDUCE-6431 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 1e85b7f0bfc5 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 / 8a91109 Default Java 1.7.0_91 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91 findbugs v3.0.0 findbugs https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/artifact/patchprocess/branch-findbugs-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-core-warnings.html unit https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-core-jdk1.8.0_66.txt unit test logs https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/artifact/patchprocess/patch-unit-hadoop-mapreduce-project_hadoop-mapreduce-client_hadoop-mapreduce-client-core-jdk1.8.0_66.txt JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/testReport/ modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common U: hadoop-mapreduce-project/hadoop-mapreduce-client Max memory used 77MB Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/6291/console This message was automatically generated.
        Hide
        haibochen Haibo Chen added a comment -

        This failure seems unrelated to the code that I added.

        Show
        haibochen Haibo Chen added a comment - This failure seems unrelated to the code that I added.
        Hide
        rkanter Robert Kanter added a comment -

        +1

        Show
        rkanter Robert Kanter added a comment - +1
        Show
        rkanter Robert Kanter added a comment - Yup. Looks like MAPREDUCE-6566 was reopened for this ( https://issues.apache.org/jira/browse/MAPREDUCE-6566?focusedCommentId=15088532&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15088532 )
        Hide
        rkanter Robert Kanter added a comment -

        Thanks Haibo. Committed to trunk and branch-2!

        Show
        rkanter Robert Kanter added a comment - Thanks Haibo. Committed to trunk and branch-2!
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #9197 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9197/)
        MAPREDUCE-6431. JobClient should be an AutoClosable (haibochen via (rkanter: rev dca0dc8ac28e843acd8b79c9560245638a539fde)

        • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/test/java/org/apache/hadoop/mapred/TestJobClient.java
        • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobClient.java
        • hadoop-mapreduce-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9197 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9197/ ) MAPREDUCE-6431 . JobClient should be an AutoClosable (haibochen via (rkanter: rev dca0dc8ac28e843acd8b79c9560245638a539fde) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/test/java/org/apache/hadoop/mapred/TestJobClient.java hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobClient.java hadoop-mapreduce-project/CHANGES.txt

          People

          • Assignee:
            haibochen Haibo Chen
            Reporter:
            fs111 André Kelpe
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development