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

Siddharth Seth commented on TEZ-1194:
-------------------------------------

Having just an internal representation, which was done in TEZ-373, should 
already allow this. No ? I don't think users need to know that an internal 
representation is any different from what they specified. The user payload has 
to be exposed back to the user in whichever form it was specified. Adding 
multiple forms, IMO, would just add confusion - especially if a payload is ever 
shared (which at the moment is the case for IOs without paylaods - and is being 
removed, and for some VertexManager plugins).
One potential advantage I see of having a wrapper is potentially sub-classing 
and creating a protocol buffer 'message' based payload - which simplifies 
serialization etc for Tez.

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

Reply via email to