You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "Hitesh Shah (JIRA)" <ji...@apache.org> on 2014/10/15 23:19:34 UTC
[jira] [Comment Edited] (TEZ-1666) UserPayload should be null if
the payload is not specified
[ https://issues.apache.org/jira/browse/TEZ-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14172963#comment-14172963 ]
Hitesh Shah edited comment on TEZ-1666 at 10/15/14 9:19 PM:
------------------------------------------------------------
[~bikassaha]
Going back to your comment:
bq. If ProcDesc.setUserPayload() not called by the user, the ideally procContext.getPayload() should also not be called because this proc does not care about the payload. If it does call getUserPayload for some reason then the actual ByteBuffer returned via that would still be null. Can this just be fixed by clarifying the javadoc?
Consider a case where there is a library provided which has various inputs/outputs/processors. Now someone else writes a client to submit a DAG using the library as building blocks and does not call setUserPayload for any object. In such a scenario, I would assume getUserPayload() to return null unless the framework itself is injecting additional data into the UserPayload object. The question that is whether we see the framework ever adding more info into a user-controlled object.
was (Author: hitesh):
[~bikassaha]
Going back to your comment:
bq. If ProcDesc.setUserPayload() not called by the user, the ideally procContext.getPayload() should also not be called because this proc does not care about the payload. If it does call getUserPayload for some reason then the actual ByteBuffer returned via that would still be null. Can this just be fixed by clarifying the javadoc?
Consider a case where there is a library provided which has various inputs/outputs/processors. Now someone else writes a client to submit a DAG using the library as building blocks and does not call setUserPayload for any object. In such a scenario, I would assume getUserPayload() to return null unless the framework itself is injecting additional data into the UserPayload object. The question that is whether we see the framework ever adding more info into a user-controlled object for the most part.
> UserPayload should be null if the payload is not specified
> ----------------------------------------------------------
>
> Key: TEZ-1666
> URL: https://issues.apache.org/jira/browse/TEZ-1666
> Project: Apache Tez
> Issue Type: Bug
> Reporter: Siddharth Seth
> Priority: Critical
>
> As an example in the ProcessorDescriptor - if no payload is specified, context.getUserPayload should return null.
> SleepProcessor has an explicit check for a null payload, to enable default sleep value - which fails.
> Marking as critical since this is an API behaviour inconsistency.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)