hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r677118 - in /hadoop/core/branches/branch-0.17: CHANGES.txt src/java/org/apache/hadoop/dfs/DFSClient.java
Date Wed, 16 Jul 2008 00:40:31 GMT
Author: rangadi
Date: Tue Jul 15 17:40:30 2008
New Revision: 677118

URL: http://svn.apache.org/viewvc?rev=677118&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.17/CHANGES.txt
    hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DFSClient.java

Modified: hadoop/core/branches/branch-0.17/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/CHANGES.txt?rev=677118&r1=677117&r2=677118&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.17/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.17/CHANGES.txt Tue Jul 15 17:40:30 2008
@@ -4,6 +4,9 @@
 
   BUG FIXES
 
+    HADOOP-3760. Fix a bug with HDFS file close() mistakenly introduced
+    by HADOOP-3681. (Lohit Vijayarenu via rangadi)
+
     HADOOP-3707. NameNode keeps a count of number of blocks scheduled 
     to be written to a datanode and uses it to avoid allocating more
     blocks than a datanode can hold. (rangadi)

Modified: hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DFSClient.java?rev=677118&r1=677117&r2=677118&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DFSClient.java (original)
+++ hadoop/core/branches/branch-0.17/src/java/org/apache/hadoop/dfs/DFSClient.java Tue Jul
15 17:40:30 2008
@@ -2630,8 +2630,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();
         
@@ -2653,8 +2653,6 @@
 
         long localstart = System.currentTimeMillis();
         boolean fileComplete = false;
-        int fileCompleteRetry = 0;
-        final int checkFileCompleteRetry = 10;
         while (!fileComplete) {
           fileComplete = namenode.complete(src, clientName);
           if (!fileComplete) {
@@ -2665,9 +2663,6 @@
               }
             } catch (InterruptedException ie) {
             }
-            // after retrying for checkFileCompleteRetry times check isClosed() 
-            if ((++fileCompleteRetry % checkFileCompleteRetry) == 0) 
-              isClosed();
           }
         }
       } finally {



Mime
View raw message