Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0F03C200BF1 for ; Tue, 3 Jan 2017 15:03:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0D984160B48; Tue, 3 Jan 2017 14:03:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 57379160B33 for ; Tue, 3 Jan 2017 15:03:53 +0100 (CET) Received: (qmail 48712 invoked by uid 500); 3 Jan 2017 14:03:52 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 48702 invoked by uid 99); 3 Jan 2017 14:03:52 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2017 14:03:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5E2EDDFBE8; Tue, 3 Jan 2017 14:03:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brahma@apache.org To: common-commits@hadoop.apache.org Date: Tue, 03 Jan 2017 14:03:52 -0000 Message-Id: <7870b8c6648140f69fcae2b9d8b281ce@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] hadoop git commit: Revert "HDFS-11280. Allow WebHDFS to reuse HTTP connections to NN. Contributed by Zheng Shao." archived-at: Tue, 03 Jan 2017 14:03:54 -0000 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 Authored: Tue Jan 3 19:19:29 2017 +0530 Committer: Brahma Reddy Battula 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