Author: rangadi
Date: Tue Jul 15 18:27:50 2008
New Revision: 677123

URL: http://svn.apache.org/viewvc?rev=677123&view=rev
Log:
HADOOP-3760. Fix a bug with HDFS file close() mistakenly introduced
by HADOOP-3681. (Lohit Vijayarenu via rangadi)

Modified:
    hadoop/core/branches/branch-0.18/CHANGES.txt
    
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java

Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=677123&r1=677122&r2=677123&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Tue Jul 15 18:27:50 2008
@@ -759,6 +759,9 @@
 
   BUG FIXES
 
+    HADOOP-3760. Fix a bug with HDFS file close() mistakenly introduced
+    by HADOOP-3681. (Lohit Vijayarenu via rangadi)
+
     HADOOP-3681. DFSClient can get into an infinite loop while closing
     a file if there are some errors. (Lohit Vijayarenu via rangadi)
 

Modified: 
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java
URL: 
http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java?rev=677123&r1=677122&r2=677123&view=diff
==============================================================================
--- 
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java 
(original)
+++ 
hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/DFSClient.java 
Tue Jul 15 18:27:50 2008
@@ -2699,8 +2699,8 @@
           }
 
         flushInternal();             // flush all data to Datanodes
-        isClosed();
-        closed = true;
+        isClosed(); // check to see if flushInternal had any exceptions
+        closed = true; // allow closeThreads() to showdown threads
 
         closeThreads();
         
@@ -2722,8 +2722,6 @@
 
         long localstart = System.currentTimeMillis();
         boolean fileComplete = false;
-        int fileCompleteRetry = 0;
-        final int checkFileCompleteRetry = 10;
         while (!fileComplete) {
           fileComplete = namenode.complete(src, clientName);
           if (!fileComplete) {
@@ -2734,9 +2732,6 @@
               }
             } catch (InterruptedException ie) {
             }
-            // after retrying for checkFileCompleteRetry times check 
isClosed() 
-            if ((++fileCompleteRetry % checkFileCompleteRetry) == 0) 
-              isClosed();
           }
         }
       } finally {


Reply via email to