hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7330) Unclosed RandomAccessFile warnings in FSDatasetIml.
Date Thu, 05 May 2016 01:53:13 GMT

    [ 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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message