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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to