hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r489186 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/util/RunJar.java
Date Wed, 20 Dec 2006 19:57:55 GMT
Author: cutting
Date: Wed Dec 20 11:57:54 2006
New Revision: 489186

URL: http://svn.apache.org/viewvc?view=rev&rev=489186
Log:
HADOOP-837.  Use hadoop.tmp.dir instead of system temp dir in RunJar.  Contributed by Hairong.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=489186&r1=489185&r2=489186
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Dec 20 11:57:54 2006
@@ -142,6 +142,10 @@
     method and better Path checking in HDFS, to help avoid such issues
     in the future.  (omalley via cutting)
 
+40. HADOOP-837.  Improve RunJar utility to unpack jar file
+    hadoop.tmp.dir, rather than the system temporary directory.
+    (Hairong Kuang via cutting)
+
 
 Release 0.9.2 - 2006-12-15
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java?view=diff&rev=489186&r1=489185&r2=489186
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/util/RunJar.java Wed Dec 20 11:57:54 2006
@@ -25,6 +25,7 @@
 import java.io.*;
 import java.util.*;
 
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileUtil;
 
 /** Run a Hadoop job jar. */
@@ -105,7 +106,8 @@
     }
     mainClassName = mainClassName.replaceAll("/", ".");
 
-    final File workDir = File.createTempFile("hadoop-unjar","");
+    final File workDir = File.createTempFile("hadoop-unjar","", 
+        new File( new Configuration().get("hadoop.tmp.dir")) );
     workDir.delete();
     if (!workDir.mkdirs()) {
       if (!workDir.isDirectory()) {



Mime
View raw message