hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r634046 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/DFSClient.java
Date Wed, 05 Mar 2008 22:02:31 GMT
Author: rangadi
Date: Wed Mar  5 14:02:30 2008
New Revision: 634046

URL: http://svn.apache.org/viewvc?rev=634046&view=rev
Log:
HADOOP-2756. NPE in DFSClient while closing DFSOutputStreams 
under load. (rangadi)

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=634046&r1=634045&r2=634046&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Mar  5 14:02:30 2008
@@ -257,6 +257,9 @@
     naming convention that will avoid clashes in multi-user shared 
     cluster scenario. (Hemanth Yamijala via nigel)
 
+    HADOOP-2756. NPE in DFSClient while closing DFSOutputStreams 
+    under load. (rangadi)
+
 Release 0.16.0 - 2008-02-07
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java?rev=634046&r1=634045&r2=634046&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java Wed Mar  5 14:02:30 2008
@@ -2322,11 +2322,17 @@
  
         // wait for threads to finish processing
         streamer.close();
-
+        // wait for threads to exit
+        streamer.join();
+        
+        // shutdown response after streamer has exited.
+        if (response != null) {
+          response.close();
+          response.join();
+          response = null;
+        }
+        
         synchronized (dataQueue) {
-          if (response != null) {
-            response.close();
-          }
           if (blockStream != null) {
             blockStream.writeInt(0); // indicate end-of-block to datanode
             blockStream.close();
@@ -2338,15 +2344,9 @@
           }
         }
 
-        // wait for threads to exit
-        streamer.join();
-        if (response != null) {
-          response.join();
-        }
         streamer = null;
         blockStream = null;
         blockReplyStream = null;
-        response = null;
 
         long localstart = System.currentTimeMillis();
         boolean fileComplete = false;



Mime
View raw message