[
https://issues.apache.org/jira/browse/HDFS-7330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15271785#comment-15271785
]
Konstantin Shvachko commented on HDFS-7330:
-------------------------------------------
Hey [~boky01], I do not see it on trunk any more.
{{getBlockInputStream()}} and {{getTmpInputStreams())}} used to have the
following
{code}
...
try {
blockInFile = new RandomAccessFile(blockFile, "r");
} catch (FileNotFoundException fnfe) {
...
{code}
where local variable {{blockInFile}} was never explicitly released inside the
method. This was showing as a warning in my Eclipse.
Now the constructor was replaced by {{openAndSeek()}}, which correctly handles
release of the local variable in case of an exception.
Will close this as a dup of HDFS-7696. Thanks for looking into this.
> Unclosed RandomAccessFile warnings in FSDatasetIml.
> ---------------------------------------------------
>
> Key: HDFS-7330
> URL: https://issues.apache.org/jira/browse/HDFS-7330
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: datanode
> Affects Versions: 2.5.1
> Reporter: Konstantin Shvachko
> Assignee: Andras Bokor
> Labels: newbie
>
> RandomAccessFile is opened as an underline file for FileInputStream. It
> should be closed when the stream is closed. So to fix these 2 warning (in
> getBlockInputStream() and getTmpInputStreams()) we just need suppress them.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]