Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 42720 invoked from network); 21 Dec 2010 22:18:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Dec 2010 22:18:22 -0000 Received: (qmail 35992 invoked by uid 500); 21 Dec 2010 22:18:22 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 35956 invoked by uid 500); 21 Dec 2010 22:18:22 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 35948 invoked by uid 99); 21 Dec 2010 22:18:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 22:18:22 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Dec 2010 22:18:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oBLMI1eR000266 for ; Tue, 21 Dec 2010 22:18:01 GMT Message-ID: <2151532.253021292969881818.JavaMail.jira@thor> Date: Tue, 21 Dec 2010 17:18:01 -0500 (EST) From: "tom pierce (JIRA)" To: common-issues@hadoop.apache.org Subject: [jira] Updated: (HADOOP-7021) MapWritable NullPointerException In-Reply-To: <23832967.30051288965765186.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-7021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] tom pierce updated HADOOP-7021: ------------------------------- Attachment: HADOOP-7021.patch I tidied the new test a bit, putting it into the current TestMapWritable class and using UTF8 as the "foreign class" instead of a one-off example Writable. Hopefully Hudson will find this patch more digestible; I followed the submission guidelines except for building the tar, which proved cumbersome on CentOS. > MapWritable NullPointerException > -------------------------------- > > Key: HADOOP-7021 > URL: https://issues.apache.org/jira/browse/HADOOP-7021 > Project: Hadoop Common > Issue Type: Bug > Components: io > Affects Versions: 0.20.1 > Environment: Hadoop 0.20.1, Centos > Reporter: John Lee > Priority: Minor > Fix For: 0.20.1 > > Attachments: AbstractMapWritable.diff, AbstractMapWritable.java, HADOOP-7021.patch, TestMapWritableNPE.java > > > We have encountered a NullPointerException when we use MapWritable with custom Writable objects. > The root cause is the counter newClasses in AbstractMapWritable is allowed to get out of sync with the id to class mapping tables when addToMap(Class) is called. We have a patch to AbstractMapWritable.addToMap(Class) that handles the case when newClasses gets out of sync with the id to class mapping tables and adds a serialization optimization to minimize the number of class names to write out per MapWritable object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.