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 to...@apache.org on 2007/06/13 23:08:06 UTC
svn commit: r547031 - in /lucene/hadoop/trunk: CHANGES.txt
src/java/org/apache/hadoop/dfs/DFSClient.java
Author: tomwhite
Date: Wed Jun 13 14:08:05 2007
New Revision: 547031
URL: http://svn.apache.org/viewvc?view=rev&rev=547031
Log:
HADOOP-1396. Fix FileNotFoundException on DFS block. Contributed by Dhruba Borthakur.
Modified:
lucene/hadoop/trunk/CHANGES.txt
lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=547031&r1=547030&r2=547031
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Jun 13 14:08:05 2007
@@ -111,6 +111,9 @@
the namenode to ignore the load on datanodes while allocating
replicas. (Dhruba Borthakur via tomwhite)
+ 36. HADOOP-1396. Fix FileNotFoundException on DFS block.
+ (Dhruba Borthakur via tomwhite)
+
Release 0.13.0 - 2007-06-08
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java?view=diff&rev=547031&r1=547030&r2=547031
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java Wed Jun 13 14:08:05 2007
@@ -1167,9 +1167,11 @@
}
private File newBackupFile() throws IOException {
- File result = conf.getFile("dfs.client.buffer.dir",
- "tmp"+File.separator+
- "client-"+Math.abs(r.nextLong()));
+ File file = conf.getFile("dfs.client.buffer.dir", "tmp");
+ File dir = file.getParentFile();
+ String prefix = "client-" + Math.abs(r.nextLong());
+ String suffix = ".tmp";
+ File result = File.createTempFile(prefix, suffix, dir);
result.deleteOnExit();
return result;
}