[
https://issues.apache.org/jira/browse/TEZ-1194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14045040#comment-14045040
]
Siddharth Seth commented on TEZ-1194:
-------------------------------------
For now, I think we should move to ByteBuffers.
In terms of a UserPayload class - there's one use case, which is far more
compelling for me than a future switch between byte/ByteBuffer.
Versioning of the payload. As an example - if MRInput / ShuffledMergedInput
decides to change it's payload form whatever is used rightnow (Configuration
for ShuffledMergedInput etc) to something else, old client code would break.
Instead Inputs / Processors / Outputs could rely on a version to figure out how
to parse the byte based payload. This can, of-course, be achieved by using some
of the bytes in the payload to set a version, that's assuming this was done
from the start.
> Make TezUserPayload user facing for payload specification
> ---------------------------------------------------------
>
> Key: TEZ-1194
> URL: https://issues.apache.org/jira/browse/TEZ-1194
> Project: Apache Tez
> Issue Type: Sub-task
> Reporter: Bikas Saha
>
> Now that we have TezUserPayload being used internally to represent user
> payload it may be useful to make it user facing on the API for specifying
> payloads. Advantages
> 1) Clear code for the user instead of having untyped byte[] everywhere
> 2) Lets us internally evolve the representation of user payload and make it
> more efficient without having to break APIs. We can start with
> TezUserPayload(byte[]) and then move on to TezUserPayload(ByteBuffer) and so
> on while maintaining backwards compatibility without needing to add new
> methods. Old code can be translated within TezUserPayload while user migrates
> the code.
--
This message was sent by Atlassian JIRA
(v6.2#6252)