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