Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9737

JarFinder#getJar should delete the jar file upon destruction of the JVM

    Details

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

      Description

      Once JarFinder.getJar() is invoked by a client app, it would be really useful to destroy the generated JAR after the JVM is destroyed by setting tempJar.deleteOnExit(). In order to preserve backwards compatibility a configuration setting could be implemented, e.g. test.build.dir.purge.on.exit

      1. HADOOP-9737.patch
        0.7 kB
        Jean-Baptiste Onofré

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2138 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2138/)
        HADOOP-9737. JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26)

        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2138 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2138/ ) HADOOP-9737 . JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #190 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/190/)
        HADOOP-9737. JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26)

        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #190 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/190/ ) HADOOP-9737 . JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #180 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/180/)
        HADOOP-9737. JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26)

        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #180 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/180/ ) HADOOP-9737 . JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2120 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2120/)
        HADOOP-9737. JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2120 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2120/ ) HADOOP-9737 . JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #922 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/922/)
        HADOOP-9737. JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #922 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/922/ ) HADOOP-9737 . JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #191 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/191/)
        HADOOP-9737. JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #191 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/191/ ) HADOOP-9737 . JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #7780 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7780/)
        HADOOP-9737. JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7780 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7780/ ) HADOOP-9737 . JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter) (rkanter: rev 315074bb08e0f2c9508834ada62f1533ffd82a26) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        Hide
        rkanter Robert Kanter added a comment -

        Thanks Jean-Baptiste Onofré for the patch and Kiran Kumar M R for the review. Committed to trunk and branch-2!

        Show
        rkanter Robert Kanter added a comment - Thanks Jean-Baptiste Onofré for the patch and Kiran Kumar M R for the review. Committed to trunk and branch-2!
        Hide
        rkanter Robert Kanter added a comment -

        +1

        Show
        rkanter Robert Kanter added a comment - +1
        Hide
        kiranmr Kiran Kumar M R added a comment -

        Checked as part of Bug Bash. Patch applies on both trunk and branch-2. TestJarFinder passing successfully.
        Moving to RFC queue.

        Show
        kiranmr Kiran Kumar M R added a comment - Checked as part of Bug Bash. Patch applies on both trunk and branch-2. TestJarFinder passing successfully. Moving to RFC queue.
        Hide
        hadoopqa Hadoop QA added a comment -



        +1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 5m 12s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
        +1 javac 7m 28s There were no new javac warning messages.
        +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings.
        +1 checkstyle 1m 5s There were no new checkstyle issues.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
        +1 install 1m 30s mvn install still works.
        +1 eclipse:eclipse 0m 31s The patch built with eclipse:eclipse.
        +1 findbugs 1m 38s The patch does not introduce any new Findbugs (version 2.0.3) warnings.
        +1 common tests 23m 39s Tests passed in hadoop-common.
            41m 29s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12592614/HADOOP-9737.patch
        Optional Tests javac unit findbugs checkstyle
        git revision trunk / f1a152c
        hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/6395/artifact/patchprocess/testrun_hadoop-common.txt
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/6395/testReport/
        Java 1.7.0_55
        uname Linux asf900.gq1.ygridcore.net 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
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6395/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 5m 12s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 7m 28s There were no new javac warning messages. +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 5s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 30s mvn install still works. +1 eclipse:eclipse 0m 31s The patch built with eclipse:eclipse. +1 findbugs 1m 38s The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 common tests 23m 39s Tests passed in hadoop-common.     41m 29s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12592614/HADOOP-9737.patch Optional Tests javac unit findbugs checkstyle git revision trunk / f1a152c hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/6395/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/6395/testReport/ Java 1.7.0_55 uname Linux asf900.gq1.ygridcore.net 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 Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6395/console This message was automatically generated.
        Hide
        hadoopqa Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12592614/HADOOP-9737.patch
        against trunk revision .

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

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

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

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

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

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2792//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2792//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12592614/HADOOP-9737.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2792//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2792//console This message is automatically generated.
        Hide
        jbonofre Jean-Baptiste Onofré added a comment -

        Patch for trunk.

        Show
        jbonofre Jean-Baptiste Onofré added a comment - Patch for trunk.
        Hide
        tucu00 Alejandro Abdelnur added a comment -

        agree with Harsh, no need for a config. Also, keep in mind JarFinder is a Hadoop test artifact, not part of Hadoop public API.

        Show
        tucu00 Alejandro Abdelnur added a comment - agree with Harsh, no need for a config. Also, keep in mind JarFinder is a Hadoop test artifact, not part of Hadoop public API.
        Hide
        qwertymaniac Harsh J added a comment -

        This sounds fine to me. Would you like to submit a patch as well?

        In order to preserve backwards compatibility a configuration setting could be implemented, e.g. test.build.dir.purge.on.exit

        The specific part you point to is specifically existing for tests alone. If the delete-on-exit change does not break any tests currently, then it is fine to go in as-is. We do not need configurability there. MR clients use a similar path and do delete created jars on regular exit.

        Show
        qwertymaniac Harsh J added a comment - This sounds fine to me. Would you like to submit a patch as well? In order to preserve backwards compatibility a configuration setting could be implemented, e.g. test.build.dir.purge.on.exit The specific part you point to is specifically existing for tests alone. If the delete-on-exit change does not break any tests currently, then it is fine to go in as-is. We do not need configurability there. MR clients use a similar path and do delete created jars on regular exit.

          People

          • Assignee:
            jbonofre Jean-Baptiste Onofré
            Reporter:
            esteban Esteban Gutierrez
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development