You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cu...@apache.org on 2006/03/16 00:54:39 UTC

svn commit: r386220 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java

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;
         }
 
         /**