hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-2330) Stream exceptions in stream closures in NNStorage.java can mask root exceptions.
Date Wed, 14 Sep 2011 01:50:09 GMT
Stream exceptions in stream closures in NNStorage.java 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


In NNStorage.java:
  There are many stream closures in finally block. 
  There is a chance that they can can mask the root exceptions.

So, better to follow the pattern like below:

  try{
     ............
     ............
     stream.close();
     stream =null;
   }
   finally{
     IOUtils.cleanup(LOG, stream);
   }


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

        

Mime
View raw message