Return-Path: Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: (qmail 14944 invoked from network); 18 Feb 2010 20:25:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Feb 2010 20:25:51 -0000 Received: (qmail 88518 invoked by uid 500); 18 Feb 2010 20:25:51 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 88461 invoked by uid 500); 18 Feb 2010 20:25:51 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 88451 invoked by uid 99); 18 Feb 2010 20:25:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Feb 2010 20:25:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Feb 2010 20:25:49 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E79DF29A0017 for ; Thu, 18 Feb 2010 12:25:27 -0800 (PST) Message-ID: <653458648.368241266524727947.JavaMail.jira@brutus.apache.org> Date: Thu, 18 Feb 2010 20:25:27 +0000 (UTC) From: "Zheng Shao (JIRA)" To: mapreduce-issues@hadoop.apache.org Subject: [jira] Created: (MAPREDUCE-1504) SequenceFile.Reader constructor leaking resources MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org 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.