You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by he...@apache.org on 2021/06/15 07:50:35 UTC
[hadoop] branch trunk updated: HDFS-16068. WebHdfsFileSystem has a
possible connection leak in connection with HttpFS (#3104)
This is an automated email from the ASF dual-hosted git repository.
hemanthboyina pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 839fcf7 HDFS-16068. WebHdfsFileSystem has a possible connection leak in connection with HttpFS (#3104)
839fcf7 is described below
commit 839fcf7682270bc6ba151875549d64d81917f425
Author: Takanobu Asanuma <ta...@apache.org>
AuthorDate: Tue Jun 15 16:50:09 2021 +0900
HDFS-16068. WebHdfsFileSystem has a possible connection leak in connection with HttpFS (#3104)
---
.../src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 7a0b1fb..d4108d0 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
@@ -2502,10 +2502,12 @@ public class WebHdfsFileSystem extends FileSystem
@VisibleForTesting
void closeInputStream(RunnerState rs) throws IOException {
if (in != null) {
- IOUtils.close(cachedConnection);
in = null;
}
- cachedConnection = null;
+ if (cachedConnection != null) {
+ IOUtils.close(cachedConnection);
+ cachedConnection = null;
+ }
runnerState = rs;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org