You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ad...@apache.org on 2021/02/09 20:26:00 UTC
[ozone] branch master updated: HDDS-4815. Close the corresponding
ChunkInputStream when BlockInputStream is being closed. (#1917)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new a5f2a4d HDDS-4815. Close the corresponding ChunkInputStream when BlockInputStream is being closed. (#1917)
a5f2a4d is described below
commit a5f2a4d365ca8897d05144d33b20ab52da2d3520
Author: Wei-Chiu Chuang <we...@apache.org>
AuthorDate: Tue Feb 9 12:25:43 2021 -0800
HDDS-4815. Close the corresponding ChunkInputStream when BlockInputStream is being closed. (#1917)
---
.../java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
index a5f3091..d0e45a0 100644
--- a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
+++ b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
@@ -413,6 +413,13 @@ public class BlockInputStream extends InputStream
public synchronized void close() {
releaseClient();
xceiverClientFactory = null;
+
+ final List<ChunkInputStream> inputStreams = this.chunkStreams;
+ if (inputStreams != null) {
+ for (ChunkInputStream is : inputStreams) {
+ is.close();
+ }
+ }
}
private void releaseClient() {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org