hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r634048 - in /hadoop/core/branches/branch-0.16: CHANGES.txt src/java/org/apache/hadoop/dfs/DFSClient.java
Date Wed, 05 Mar 2008 22:04:08 GMT
Author: rangadi
Date: Wed Mar  5 14:04:01 2008
New Revision: 634048

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

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

Modified: hadoop/core/branches/branch-0.16/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/CHANGES.txt?rev=634048&r1=634047&r2=634048&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.16/CHANGES.txt Wed Mar  5 14:04:01 2008
@@ -117,6 +117,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/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DFSClient.java?rev=634048&r1=634047&r2=634048&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DFSClient.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DFSClient.java Wed Mar
 5 14:04:01 2008
@@ -2260,11 +2260,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();
@@ -2276,15 +2282,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