HADOOP-9737. JarFinder#getJar should delete the jar file upon destruction of the JVM (jbonofre via rkanter)

(cherry picked from commit 315074bb08)
This commit is contained in:
Robert Kanter 2015-05-08 16:05:04 -07:00
parent 23065e6051
commit 015b30c3ab
2 changed files with 4 additions and 0 deletions

View File

@ -467,6 +467,9 @@ Release 2.7.0 - 2015-04-20
HADOOP-11801. Update BUILDING.txt for Ubuntu. (Gabor Liptak via
Arpit Agarwal)
HADOOP-9737. JarFinder#getJar should delete the jar file upon destruction
of the JVM (jbonofre via rkanter)
OPTIMIZATIONS
HADOOP-11323. WritableComparator#compare keeps reference to byte array.

View File

@ -160,6 +160,7 @@ else if ("file".equals(url.getProtocol())) {
File tempJar = File.createTempFile("hadoop-", "", testDir);
tempJar = new File(tempJar.getAbsolutePath() + ".jar");
createJar(baseDir, tempJar);
tempJar.deleteOnExit();
return tempJar.getAbsolutePath();
}
}