hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvasu...@apache.org
Subject [38/50] [abbrv] hadoop git commit: Revert "HDFS-11280. Allow WebHDFS to reuse HTTP connections to NN. Contributed by Zheng Shao."
Date Wed, 04 Jan 2017 08:04:12 GMT
Revert "HDFS-11280. Allow WebHDFS to reuse HTTP connections to NN. Contributed by Zheng Shao."

This reverts commit b811a1c14d00ab236158ab75fad1fe41364045a4.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b31e1951
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b31e1951
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b31e1951

Branch: refs/heads/YARN-5673
Commit: b31e1951e044b2c6f6e88a007a8c175941ddd674
Parents: 6938b67
Author: Brahma Reddy Battula <brahma@apache.org>
Authored: Tue Jan 3 19:19:29 2017 +0530
Committer: Brahma Reddy Battula <brahma@apache.org>
Committed: Tue Jan 3 19:19:29 2017 +0530

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java    | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b31e1951/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
index c89913e..26cfc01 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
@@ -659,9 +659,7 @@ public class WebHdfsFileSystem extends FileSystem
           url = new URL(conn.getHeaderField("Location"));
           redirectHost = url.getHost() + ":" + url.getPort();
         } finally {
-          // Don't call conn.disconnect() to allow connection reuse
-          // See http://tinyurl.com/java7-http-keepalive
-          conn.getInputStream().close();
+          conn.disconnect();
         }
       }
       try {
@@ -893,9 +891,7 @@ public class WebHdfsFileSystem extends FileSystem
         LOG.debug("Response decoding failure.", e);
         throw ioe;
       } finally {
-        // Don't call conn.disconnect() to allow connection reuse
-        // See http://tinyurl.com/java7-http-keepalive
-        conn.getInputStream().close();
+        conn.disconnect();
       }
     }
 
@@ -942,9 +938,6 @@ public class WebHdfsFileSystem extends FileSystem
             try {
               validateResponse(op, conn, true);
             } finally {
-              // This is a connection to DataNode.  Let's disconnect since
-              // there is little chance that the connection will be reused
-              // any time soonl
               conn.disconnect();
             }
           }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message