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 ta...@apache.org on 2021/06/15 08:23:31 UTC
[hadoop] branch branch-3.3 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.
tasanuma pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.3 by this push:
new 546c66b HDFS-16068. WebHdfsFileSystem has a possible connection leak in connection with HttpFS (#3104)
546c66b is described below
commit 546c66b812d61286f8420e8be6861fff2cb14026
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)
(cherry picked from commit 839fcf7682270bc6ba151875549d64d81917f425)
---
.../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 7a0857e..df70451 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
@@ -2474,10 +2474,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