[
https://issues.apache.org/jira/browse/TEZ-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14187642#comment-14187642
]
Hitesh Shah commented on TEZ-1666:
----------------------------------
Looks ok for the most part.
{code}
public T setUserPayload(UserPayload userPayload) {
- Preconditions.checkNotNull(userPayload);
this.userPayload = userPayload;
return (T) this;
{code}
The precondition check can and probably should remain as is. It is valid to do
a check on an arg being passed in. i.e. calling setUserPayload(null) should not
be allowed.
Also, this may be worth calling out as an incompatible change in the changelogs
that this will affect behavior for apps that were not written with safety in
mind as now there is a possibility that context::getUserPayload will return a
null unlike earlier. ( as seen via the changes in BroadcastAndOneToOneExample )
> 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
> Assignee: Siddharth Seth
> Priority: Critical
> Attachments: TEZ-1666.1.txt
>
>
> 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)