[
https://issues.apache.org/jira/browse/HDFS-17979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115405#comment-18115405
]
Ayush Saxena commented on HDFS-17979:
-------------------------------------
Committed to trunk.
Thanx [~iamsanjaymalakar] for the contribution!!!
> TeeOutputStream.close() should close every wrapped output
> ---------------------------------------------------------
>
> Key: HDFS-17979
> URL: https://issues.apache.org/jira/browse/HDFS-17979
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: tools
> Affects Versions: 3.4.1
> Reporter: Sanjay Malakar
> Assignee: Sanjay Malakar
> Priority: Minor
> Labels: pull-request-available
>
> The OfflineEditsViewer
> \{{org.apache.hadoop.hdfs.tools.offlineEditsViewer.TeeOutputStream.close()}}
> closes its wrapped output streams in a for-each loop. If one
> \{{java.io.OutputStream.close()}} call throws \{{java.io.IOException}}, the
> loop exits and every later output is left open.
> {\{close()}} should attempt every output, keep the first
> \{{java.io.IOException}}, attach later failures as suppressed exceptions, and
> throw the first one after every output has been attempted. This mirrors the
> fix in ZOOKEEPER-5055 for \{{FileTxnLog.close()}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]