Eric Payne commented on YARN-4225:

Thanks [~leftnoteasy], for your helpful comments.
bq. Do you think is it better to return boolean? I'd prefer to return a default 
value (false) instead of return null
This is the nature of the question that I have about the more general Hadoop 
policy, and which [~jlowe] and I were discussing in the comments above.
Basically, the use case is a newer client is querying an older server, and so 
some of the newer protobuf entries that the client expects may not exist. In 
that case, we have 2 options that I can see:
# The client exposes both the {{get}} protobuf method and the {{has}} protobuf 
method for the structure in question
# We overload the {{get}} protobuf method to do the {{has}} checking internally 
and return NULL if the field doesn't exist.
I actually prefer the second option because it exposes only one method. But, I 
would like to know the opinion of others and if there is already a precedence 
for this use case.

> Add preemption status to yarn queue -status for capacity scheduler
> ------------------------------------------------------------------
>                 Key: YARN-4225
>                 URL: https://issues.apache.org/jira/browse/YARN-4225
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: capacity scheduler, yarn
>    Affects Versions: 2.7.1
>            Reporter: Eric Payne
>            Assignee: Eric Payne
>            Priority: Minor
>         Attachments: YARN-4225.001.patch, YARN-4225.002.patch, 
> YARN-4225.003.patch

This message was sent by Atlassian JIRA

Reply via email to