hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r386220 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
Date Wed, 15 Mar 2006 23:54:39 GMT
Author: cutting
Date: Wed Mar 15 15:54:37 2006
New Revision: 386220

URL: http://svn.apache.org/viewcvs?rev=386220&view=rev
Log:
Fix for HADOOP-66.  Delete dfs temp files on JVM exit.

Modified:
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java?rev=386220&r1=386219&r2=386220&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java Wed Mar 15 15:54:37
2006
@@ -557,9 +557,11 @@
         }
 
         private File newBackupFile() throws IOException {
-          return conf.getFile("dfs.data.dir",
-                              "tmp"+File.separator+
-                              "client-"+Math.abs(r.nextLong()));
+          File result = conf.getFile("dfs.data.dir",
+                                     "tmp"+File.separator+
+                                     "client-"+Math.abs(r.nextLong()));
+          result.deleteOnExit();
+          return result;
         }
 
         /**



Mime
View raw message