hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2330) In NNStorage.java, IOExceptions of stream closures can mask root exceptions.
Date Sun, 18 Sep 2011 13:18:11 GMT

    [ https://issues.apache.org/jira/browse/HDFS-2330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107443#comment-13107443
] 

Hudson commented on HDFS-2330:
------------------------------

Integrated in Hadoop-Mapreduce-trunk #834 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/834/])
    HDFS-2330. In NNStorage and FSImagePreTransactionalStorageInspector, IOExceptions of stream
closures can mask root exceptions.  Contributed by Uma Maheswara Rao G

szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1172219
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImagePreTransactionalStorageInspector.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java


> In NNStorage.java, IOExceptions of stream closures  can mask root exceptions.
> -----------------------------------------------------------------------------
>
>                 Key: HDFS-2330
>                 URL: https://issues.apache.org/jira/browse/HDFS-2330
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node
>    Affects Versions: 0.24.0
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>             Fix For: 0.24.0
>
>         Attachments: HDFS-2330.patch, HDFS-2330.patch
>
>
> In NNStorage.java:
>   There are many stream closures in finally block. 
>   There is a chance that they can mask the root exceptions.
> So, better to follow the pattern like below:
> {code}
>   try{
>      ............
>      ............
>      stream.close();
>      stream =null;
>    }
>    finally{
>      IOUtils.cleanup(LOG, stream);
>    }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message