hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r390717 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
Date Sat, 01 Apr 2006 18:18:47 GMT
Author: cutting
Date: Sat Apr  1 10:18:45 2006
New Revision: 390717

URL: http://svn.apache.org/viewcvs?rev=390717&view=rev
Log:
If close() fails, then abandon the file, so that any leases are
cleared and other task may attempt to create it.

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=390717&r1=390716&r2=390717&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 Sat Apr  1 10:18:45
2006
@@ -809,7 +809,12 @@
 
             flush();
             if (filePos == 0 || bytesWrittenToBlock != 0) {
-              endBlock();
+              try {
+                endBlock();
+              } catch (IOException e) {
+                namenode.abandonFileInProgress(src.toString());
+                throw e;
+              }
             }
 
             backupStream.close();



Mime
View raw message