[
https://issues.apache.org/jira/browse/TEZ-1390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14099238#comment-14099238
]
Tsuyoshi OZAWA commented on TEZ-1390:
-------------------------------------
[~sseth], thank you for review.
{quote}
UserPayload.getPayload() - I think this needs to return a read only buffer, and
we should make that clear in the Javadocs
{quote}
Its motivation looks reasonable to me . One problem is how to deal with
{{*Configurer#toByteArray()}}. One idea is to make toByteArray return
ByteBuffer. What do you think?
{code}
public byte[] toByteArray() {
try {
return TezUtils.createUserPayloadFromConf(conf).getPayload().array();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
{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, 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)