[
https://issues.apache.org/jira/browse/HDFS-14892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16944675#comment-16944675
]
Wei-Chiu Chuang commented on HDFS-14892:
----------------------------------------
Good finding, Kihwal. I am aware the client creates an empty file in such a
case but didn't realize the upstream leaks.
> Close the output stream if createWrappedOutputStream() fails
> ------------------------------------------------------------
>
> Key: HDFS-14892
> URL: https://issues.apache.org/jira/browse/HDFS-14892
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Kihwal Lee
> Priority: Major
>
> create() in an encryption zone is a two step process by the client. First, a
> regular FSOutputStream is created and then it is wrapped with an encrypted
> stream. When there is a system issue or a KMS ACL-based denial, the second
> phase will fail. If the client terminates right away, the shutdown hook
> closes the output stream opened in the first phase. But if the client lives
> on, the output stream will leak.
> Datanode's WebHdfsHandler, DFSClient, DistributedFileSystem, Hdfs
> (FileContext) and RpcProgramNfs3 do this.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]