Bläddra i källkod

undoing erroneous commit of HDFS-1836 to 0.20-security-205 intended for 0.20-security branch

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-205@1135850 13f79535-47bb-0310-9956-ffa450edef68
Matthew Foley 14 år sedan
förälder
incheckning
da02d3d171
2 ändrade filer med 12 tillägg och 14 borttagningar
  1. 0 11
      CHANGES.txt
  2. 12 3
      src/hdfs/org/apache/hadoop/hdfs/DFSClient.java

+ 0 - 11
CHANGES.txt

@@ -1,16 +1,5 @@
 Hadoop Change Log
 
-Release 0.20.206.0 - unreleased
-
-  NEW FEATURES
-
-  BUG FIXES
-
-  IMPROVEMENTS
-
-    HDFS-1836. Thousand of CLOSE_WAIT socket. Contributed by Todd Lipcon,
-    ported to security branch by Bharath Mundlapudi. (via mattf)
-
 Release 0.20.205.0 - unreleased
 
   BUG FIXES

+ 12 - 3
src/hdfs/org/apache/hadoop/hdfs/DFSClient.java

@@ -2526,7 +2526,11 @@ public class DFSClient implements FSConstants, java.io.Closeable {
             }
 
             synchronized (dataQueue) {
-              IOUtils.cleanup(LOG, blockStream, blockReplyStream);
+              try {
+                blockStream.close();
+                blockReplyStream.close();
+              } catch (IOException e) {
+              }
               nodes = null;
               response = null;
               blockStream = null;
@@ -2666,7 +2670,11 @@ public class DFSClient implements FSConstants, java.io.Closeable {
       }
 
       if (blockStream != null) {
-        IOUtils.cleanup(LOG, blockStream, blockReplyStream);
+        try {
+          blockStream.close();
+          blockReplyStream.close();
+        } catch (IOException e) {
+        }
       }
       blockStream = null;
       blockReplyStream = null;
@@ -3409,7 +3417,8 @@ public class DFSClient implements FSConstants, java.io.Closeable {
         synchronized (dataQueue) {
           if (blockStream != null) {
             blockStream.writeInt(0); // indicate end-of-block to datanode
-            IOUtils.cleanup(LOG, blockStream, blockReplyStream);
+            blockStream.close();
+            blockReplyStream.close();
           }
           if (s != null) {
             s.close();