[ 
https://issues.apache.org/jira/browse/HADOOP-6165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742947#action_12742947
 ] 

Doug Cutting commented on HADOOP-6165:
--------------------------------------

This looks very nice!  A few nits:
 - BaseSerialization and BaseDeserialization might be instead called 
SerializationBase and DeserializationBase.
 - BaseSerializationWrapper might instead be called LegacySerialization.  
Similarly for BaseDeserializationWrapper.
 - Should this patch update AvroSerialization too?  In this case we could use 
something like 
SpecificRecord.class.isAssignableFrom(Class.forName(meta.get("class")), and, if 
that fails, use GenericDatumReader.  That way Avro data can be read whether or 
not a specific or reflect class is loaded.

> Add metadata to Serializations
> ------------------------------
>
>                 Key: HADOOP-6165
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6165
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: contrib/serialization
>            Reporter: Tom White
>            Assignee: Tom White
>            Priority: Blocker
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-6165-v2.patch, HADOOP-6165.patch
>
>
> The Serialization framework only allows a class to be passed as metadata. 
> This assumes there is a one-to-one mapping between types and Serializations, 
> which is overly restrictive. By permitting applications to pass arbitrary 
> metadata to Serializations, they can get more control over which 
> Serialization is used, and would also allow, for example, one to pass an Avro 
> schema to an Avro Serialization.

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