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

Tom White commented on MAPREDUCE-326:
-------------------------------------

[Chris] > Section 3.3- addressing backwards compatibility- actually *introduces 
a buffer copy*, unless the serializers are backed by the output collector 
(which would make the call to {{collect}} redundant).
[Arun] > This is completely unworkable, it adds an extra buffer copy from the 
map's <key, value> into to the sort buffer (io.sort.mb) for the 'high-level' 
api.

The proposal does not introduce extra buffer copies. The example in section 3.3 
is really just a reorganization of the current code, since the serializers are 
constructed with DataOutputStream objects - just as they are now. The point is 
that the serialization is moved out of the kernel. There is no extra copying 
going on.

There is a mistake in the document - it should say RawMapOutputCollector takes 
DataOutputBuffer (not DataInputBuffer), or better, DataOutputStream objects - 
sorry if this was misleading.

[Chris] > One can read directly from a stream into a byte-oriented record and 
"serialize" that record into the MapOutputBuffer by a single buffer copy.
[Owen > Pipes *would* get much easier if it moved to the context object API. 
Moving to Tom's API wouldn't help at all over the context object API.

This incurs an extra copy in the byte-oriented record (BytesWritable). In the 
case of Pipes, for example, map outputs are read into a BytesWritable, which 
are then written to the MapOutputBuffer. With a binary API it would be possible 
to bypass the BytesWritable and write directly into the MapOutputBuffer.

[Arun] > I'm not sure I follow, what is the relation between 
MapOutputBuffer.collect and IFile.append? Are you proposing we do away with the 
sort?

No, of course not. Keys and values sent to MapOutputBuffer.collect() ultimately 
find their way to IFile.append() (in MapOutputBuffer's sortAndSpill() method). 
I'm just remarking that these become binary level interfaces, so there are no 
generic types in these interfaces in this proposal.

Perhaps the term "API" is causing confusion here. As I have said this is not 
intended for users - it should really be viewed as an integration point for 
developers. This situation is like the one for developers writing MapReduce 
schedulers. In this case the TaskScheduler class is package private, so 
developers have to put their scheduler implementation into the same package. 
For a binary layer, I am suggesting that we use the interface annotations to 
achieve a similar effect, but without the limitation that their classes have to 
go in the same package.


> 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
>         Attachments: MAPREDUCE-326-api.patch, MAPREDUCE-326.pdf
>
>
> 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