[jira] [Commented] (YARN-662) Enforce required parameters for all the protocols
[ https://issues.apache.org/jira/browse/YARN-662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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
[jira] [Commented] (YARN-662) Enforce required parameters for all the protocols
[ https://issues.apache.org/jira/browse/YARN-662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13660396#comment-13660396 ] Vinod Kumar Vavilapalli commented on YARN-662: -- We can do it server side as well as on the client side, but clearly server-side is a must. If isn't a big change, protocol by protocol, we should fix both the server side as well as the client libraries. It'll be easier that way both for dev and review. bq. Does this include making null checks etc on all incoming fields in the API handlers? Yes, these would essentially be null checks. 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
[jira] [Commented] (YARN-662) Enforce required parameters for all the protocols
[ https://issues.apache.org/jira/browse/YARN-662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13658795#comment-13658795 ] Bikas Saha commented on YARN-662: - Does this include making null checks etc on all incoming fields in the API handlers? Currently in most places we simply access the fields assuming they will be valid. 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