瀏覽代碼

Merge -r 557779:557780 from trunk to 0.14 branch. Fixes: HADOOP-1625.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/branches/branch-0.14@557782 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 年之前
父節點
當前提交
371b9c67e6
共有 2 個文件被更改,包括 11 次插入0 次删除
  1. 3 0
      CHANGES.txt
  2. 8 0
      src/java/org/apache/hadoop/dfs/DataNode.java

+ 3 - 0
CHANGES.txt

@@ -376,6 +376,9 @@ Branch 0.14 (unreleased changes)
 117. HADOOP-1620.  Reduce the number of abstract FileSystem methods,
      simplifying implementations.  (cutting)
 
+118. HADOOP-1625.  Fix a "could not move files" exception in datanode.
+     (Raghu Angadi via cutting)
+
 
 Release 0.13.0 - 2007-06-08
 

+ 8 - 0
src/java/org/apache/hadoop/dfs/DataNode.java

@@ -946,6 +946,14 @@ public class DataNode implements FSConstants, Runnable {
               // Write checksum
               checksumOut.write( buf, len, checksumSize );
               myMetrics.wroteBytes( len );
+            } else {
+              /* Should we sync() files here? It can add many millisecs of
+               * latency. We did not sync before HADOOP-1134 either.
+               */ 
+              out.close();
+              out = null;
+              checksumOut.close();
+              checksumOut = null;
             }
             
           } catch (IOException iex) {