[ 
https://issues.apache.org/jira/browse/AVRO-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13578796#comment-13578796
 ] 

Doug Cutting commented on AVRO-1254:
------------------------------------

The history is simply that I originally wrote the Avro mapred API & Garret Wu 
subsequently contributed the new mapreduce APIs, and the two use different 
styles.

AvroKey and AvroValue are marker subclasses of AvroWrapper.  An AvroWrapper can 
be a key or a value, but at runtime we sometimes need to tell the difference, 
so use different subclasses to mark this.  It's more-or-less equivalent to 
adding an 'isKey' boolean field to AvroWrapper.

I suspect what you meant is that mapreduce's AvroKeyValue is a lot like 
mapred's Pair.  I agree, but, when Garrett contributed his code I couldn't see 
a way to convert one to the other without a substantial rewrite of one of the 
APIs.

You now have the privilege of choosing a style for a Trevni mapreduce API.  
Ideally someone could take an existing job and change very little to convert it 
from reading or writing Avro to reading or writing Trevni.  With the Trevni 
mapred API, if you're already using the Avro mapred API then you should just 
need to call job#setInputFormat() and/or job#setOutputFormat() to switch to 
Trevni.


                
> Trevni support for the mapreduce apis
> -------------------------------------
>
>                 Key: AVRO-1254
>                 URL: https://issues.apache.org/jira/browse/AVRO-1254
>             Project: Avro
>          Issue Type: Improvement
>            Reporter: Ted Malaska
>            Assignee: Ted Malaska
>            Priority: Minor
>
> Right now there are a Input and Output Format for the Map/Reduce mapred api 
> but not for the mapreduce api.
> I will add that support in a new package called 
> org.apache.trevni.avro.mapreduce in the trevni-avro package
> I will also attempt to move mapred formats to a new 
> org.apache.trevni.avro.mapred package

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to