Repository: hadoop Updated Branches: refs/heads/branch-2 d6e5e4288 -> 029b6fbe7 refs/heads/branch-2.7 d90f7412f -> a3f4ee53c refs/heads/branch-2.8 b8be8f0d4 -> 7392a5a72 refs/heads/trunk 6938b6771 -> b31e1951e
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/trunk Commit: b31e1951e044b2c6f6e88a007a8c175941ddd674 Parents: 6938b67 Author: Brahma Reddy Battula <[email protected]> Authored: Tue Jan 3 19:19:29 2017 +0530 Committer: Brahma Reddy Battula <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
