hadoop-mapreduce-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Created: (MAPREDUCE-1504) SequenceFile.Reader constructor leaking resources
Date Thu, 18 Feb 2010 20:25:27 GMT
SequenceFile.Reader constructor leaking resources
-------------------------------------------------

                 Key: MAPREDUCE-1504
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1504
             Project: Hadoop Map/Reduce
          Issue Type: New Feature
            Reporter: Zheng Shao


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).


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message