hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enis Soztutar <enis.soz.nu...@gmail.com>
Subject Re: [jira] Updated: (HADOOP-1601) GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
Date Fri, 27 Jul 2007 13:09:29 GMT

There seems to be an error with the issue tracking system (at least for 
my account). So i am attaching the patch here (sorry for the trouble). 
This version compares classes, rather than class names, adds some 
javadoc and improves logging in the test case.


Enis Soztutar (JIRA) wrote:
>      [ https://issues.apache.org/jira/browse/HADOOP-1601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> Enis Soztutar updated HADOOP-1601:
> ----------------------------------
>     Attachment: genericWritable_v1.0.patch
> This patch delegates object initialization to ReflectionUtils, and changes GenericWritable
to implement Configurable. A test case for GenericWritable is added. 
> I have also found a subtle bug in {{GenericWritable#set()}}. If {{getTypes()}} returns
classes such that a subclass is listed before its superclass, then the type of the wrapped
object is set wrong, since {{Class#isInstanceOf()}} returns true. The bug is fixed by comparing
class names. 
>> GenericWritable should use ReflectionUtils.newInstance to avoid problems with classloaders
>> ------------------------------------------------------------------------------------------
>>                 Key: HADOOP-1601
>>                 URL: https://issues.apache.org/jira/browse/HADOOP-1601
>>             Project: Hadoop
>>          Issue Type: Bug
>>          Components: io
>>    Affects Versions: 0.15.0
>>            Reporter: Owen O'Malley
>>            Assignee: Enis Soztutar
>>             Fix For: 0.15.0
>>         Attachments: genericWritable_v1.0.patch
>> GenericWritable currently uses Class.newInstance and it should use hadoop.utils.ReflectionUtils.newInstance.
Furthermore, GenericWritable should be Configurable and should configure the nested objects.
This will prevent a lot of classloader issues and allow the objects to get a configuration.

View raw message