Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-1504

SequenceFile.Reader constructor leaking resources

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When SequenceFile.Reader constructor throws an IOException (because the file does not conform to SequenceFile format), we will have such a problem.
      The caller won't have a pointer to the reader because of the IOException thrown.

      We should call in.close() inside the constructor to make sure that we don't leak resources (file descriptor and connection to the data node, etc).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                zshao Zheng Shao
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: