[
https://issues.apache.org/jira/browse/HDFS-9641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15171353#comment-15171353
]
Yongtao Yang commented on HDFS-9641:
------------------------------------
bad format in previous reply.
{{
public synchronized void close() throws IOException {
if (closed) { // <---- it will enter this branch in my case
IOException e = lastException;
if (e == null)
return;
else
throw e;
}
......
}
}}
> 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)