Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 22114 invoked from network); 28 Nov 2007 04:43:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2007 04:43:08 -0000 Received: (qmail 78060 invoked by uid 500); 28 Nov 2007 04:42:56 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 78023 invoked by uid 500); 28 Nov 2007 04:42:56 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 78014 invoked by uid 99); 28 Nov 2007 04:42:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 20:42:56 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 04:43:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 177D0714159 for ; Tue, 27 Nov 2007 20:42:43 -0800 (PST) Message-ID: <15011437.1196224963063.JavaMail.jira@brutus> Date: Tue, 27 Nov 2007 20:42:43 -0800 (PST) From: "Devaraj Das (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Updated: (HADOOP-2244) MapWritable.readFields needs to clear internal hash else instance accumulates entries forever In-Reply-To: <23311346.1195628743149.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-2244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Devaraj Das updated HADOOP-2244: -------------------------------- Status: Patch Available (was: Open) Patch looks good. Submitting it to hudson. > MapWritable.readFields needs to clear internal hash else instance accumulates entries forever > --------------------------------------------------------------------------------------------- > > Key: HADOOP-2244 > URL: https://issues.apache.org/jira/browse/HADOOP-2244 > Project: Hadoop > Issue Type: Bug > Components: io > Reporter: stack > Assignee: stack > Fix For: 0.16.0 > > Attachments: 2244-v2.patch, hadoop-2244.patch > > > A common framework pattern is to get an instance of a Writable, usually by reflection, and then just keep calling readFields to make new 'instances' of the particular Writable. > For example, the spill-to-disk that is run at the end of a map task gets instances of map output keys and values and then loops over the (sorted) map output calling readFields to make instances to write out to the filesystem (See around line #470 in the spill method). > If the particular Writable is an instance of MapWritable, currently we get funny results. It has an internal hash map that is created on instantiation. Each time the readFields method is called, the newly deserialized entries are added to the internal map. The map needs to be reset when readFields is called so it doesn't just keep growing ad infinitum. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.