[ 
https://issues.apache.org/jira/browse/MAPREDUCE-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767881#action_12767881
 ] 

Doug Cutting commented on MAPREDUCE-326:
----------------------------------------

> I'm interested in suggestions for a compromise design that raises other 
> languages to first order citizens in Hadoop [ ... ]

MapReduce keys and values are currently mapped to Java classes, 
map.input.key.class, etc.  However HADOOP-6165 adds support for metadata 
describing serialized data.  For back-compatibility, this metadata can be a 
Java class name, but it can also be language-independent, e.g., an Avro Schema. 
 With this approach, the MapReduce framework can treat things as opaque byte 
arrays (as it already often does).  When data is passed to other languages, it 
can be passed as opaque binary, but now with language-independent metadata 
describing it.

> one can not efficiently merge/sort if one must instantiate objects to do it, 
> so we require the writing of byte based comparators. Yuck!

With Avro one can specify ordering in the schema.  This permits a data type, 
e.g., created by C++ code to be efficiently sorted by Java code.  Avro 
comparisions do not require object creation, but are implememented directly on 
binary data, like our current "raw" comparators.

http://hadoop.apache.org/avro/docs/current/spec.html#order

The shuffle treats data as opaque binary except when comparing keys.  Then it 
still uses Java class names to construct a comparator.  It would be good to get 
this to use a metadata-based API.  The Serialization interface could have a 
getRawComparator() interface added to support this.  I just filed HADOOP-6323 
and MAPREDUCE-1126 for this.


> The lowest level map-reduce APIs should be byte oriented
> --------------------------------------------------------
>
>                 Key: MAPREDUCE-326
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-326
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>            Reporter: eric baldeschwieler
>
> As discussed here:
> https://issues.apache.org/jira/browse/HADOOP-1986#action_12551237
> The templates, serializers and other complexities that allow map-reduce to 
> use arbitrary types complicate the design and lead to lots of object creates 
> and other overhead that a byte oriented design would not suffer.  I believe 
> the lowest level implementation of hadoop map-reduce should have byte string 
> oriented APIs (for keys and values).  This API would be more performant, 
> simpler and more easily cross language.
> The existing API could be maintained as a thin layer on top of the leaner API.

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