Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-43 Ignoring IOExceptions on close
  3. HDFS-2330

In NNStorage.java, IOExceptions of stream closures can mask root exceptions.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-alpha
    • 2.0.2-alpha
    • namenode
    • None
    • Reviewed

    Description

      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:

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

      Attachments

        1. HDFS-2330.patch
          2 kB
          Uma Maheswara Rao G
        2. HDFS-2330.patch
          2 kB
          Uma Maheswara Rao G

        Activity

          People

            umamaheswararao Uma Maheswara Rao G
            umamaheswararao Uma Maheswara Rao G
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: