[
https://issues.apache.org/jira/browse/TEZ-1390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14101319#comment-14101319
]
Siddharth Seth commented on TEZ-1390:
-------------------------------------
Thanks [~ozawa] - this mostly looks good. There's some minor changes, for which
I'm just modifying the patch and re-uplaoding - so that 0.5.0 can go out later
today.
Minor comments
- EntityDescriptor - instead of looping over the ByteBuffer - we should just
copy this out once. Also length is byteBuffer.limit() - byteBuffer.position. if
length is 0, we shouldn't write anything out.
- Similarly for UserPayload.deepCopyByteArray(). It'd be nicer if this method
were not in UserPayload, and instead was a private helper - so that it's not
exposed on ByteBayload, but that can be done later as long as it's annotated
private.
- TestVertexImpl - we're bringing in an Avro dependency. Hadoop already has a
DataInputByteBuffer which can be used
{code}
DataInputByteBuffer in = new DataInputByteBuffer();
in.reset(payload.getPayload());
this.readFields(in);
{code}
- IntersectDataGen GenDataProcessor.createConfiguration should ideally just
return a BytePayload. This is private, so can be done later.
- MRInputHeleprs.parseMRInputPayload - javadoc should just say UserPayload
instead of btyes
- MRInputHelpers: return new
UserPayload(ByteBuffer.wrap(userPayloadBuilder.build().toByteArray())) can be
userPayloadBuider.build().asReadOnlyByteBuffer(). Similarly for some Test code.
> Replace byte[] with ByteBuffer as the type of user payload in the API
> ---------------------------------------------------------------------
>
> Key: TEZ-1390
> URL: https://issues.apache.org/jira/browse/TEZ-1390
> Project: Apache Tez
> Issue Type: Improvement
> Reporter: Bikas Saha
> Assignee: Tsuyoshi OZAWA
> Priority: Blocker
> Attachments: TEZ-1390.1.patch, TEZ-1390.2.patch, TEZ-1390.3.patch,
> TEZ-1390.4.txt, pig.payload.txt
>
>
> This is just and API change. Internally we can continue to use byte[] since
> thats a much bigger change.
> The translation from ByteBuffer to byte[] in the API layer should not have
> perf impact.
--
This message was sent by Atlassian JIRA
(v6.2#6252)