hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhijie Shen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-662) Enforce required parameters for all the protocols
Date Fri, 14 Jun 2013 16:36:22 GMT

    [ https://issues.apache.org/jira/browse/YARN-662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683504#comment-13683504

Zhijie Shen commented on YARN-662:

Bellow is the strategy to enforce the required parameters, check the values, and set the defaults:

1. As we have no control on Client and AM, the protocol objects need to be validated (both
null check and value check) at ResourceManager and NodeManager when they are received.

2. The protocol objects that are constructed by ResourceManager and NodeManager need to validate
the fields before sending them out. After YARN-753, the modification need to could be limited
to the factory method in each protocol class.

3. Instead of changing the modifier in \*.proto from *optional* to *required*, we add the
custom validation routines in Java code. See the suggestion in https://developers.google.com/protocol-buffers/docs/proto#simple

4. Default values are added in *.proto. Whenever an optional field that a the default value
is not set in Java code, the default value will be picked.
> Enforce required parameters for all the protocols
> -------------------------------------------------
>                 Key: YARN-662
>                 URL: https://issues.apache.org/jira/browse/YARN-662
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Siddharth Seth
>            Assignee: Zhijie Shen
> All proto fields are marked as options. We need to mark some of them as requried, or
enforce these server side. Server side is likely better since that's more flexible (Example
deprecating a field type in favour of another - either of the two must be present)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message