[
https://issues.apache.org/jira/browse/HDFS-9641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15172093#comment-15172093
]
Colin Patrick McCabe commented on HDFS-9641:
--------------------------------------------
It looks like this was fixed by HDFS-7854, which separated out the
{{DataStreamer}} class from the {{DFSInputStream}} class. As part of that
refactoring, {{DataStreamer#closeStream}} no longer closed the stream as a
whole when it closed.
> IOException in hdfs write process causes file leases not released
> -----------------------------------------------------------------
>
> Key: HDFS-9641
> URL: https://issues.apache.org/jira/browse/HDFS-9641
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs-client
> Affects Versions: 2.6.0, 2.6.1, 2.6.2, 2.6.3
> Environment: hadoop 2.6.0,
> Reporter: Yongtao Yang
>
> when writing a file, an {{IOException}} may be raised in
> {{DFSOutputStream.DataStreamer.run()}}, then '{{streamerClosed}}' may be set
> to {{true}}, then {{closeInternal()}} will be invoked, where
> {{DFSOutputStream.closed}} will be set to be {{true}}. That is to say,
> '{{closed}}' is true before {{DFSOutputStream.close()}} is invoked, then
> {{dfsClient.endFileLease(fileId)}} will not be executed. The references of
> the {{DFSOutputStream}} objects will still be hold in
> {{DFSClient.filesBeingWritten}} untill the client quits. The related
> resources will not be released. HDFS-4504 is a related issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)