[ https://issues.apache.org/jira/browse/YARN-7448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16257150#comment-16257150 ]
Arun Suresh commented on YARN-7448: ----------------------------------- [~kkaranasos] bq. setSchedulingRequests seems to do nothing at the moment bq. all other methods of this class are abstract; builders are then used to call the getters and setters. Is there a reason we chose to do it differently for the get/setSchedulingRequests? This is intentional. New methods should not be abstract because the AllocateRequest is public API and marked Public+Stable, thus clients should be allowed to use an older version of interface in their code without throwing exception. If the methods were abstract (without their default implementation) then they would have to modify their existing libraries. bq. I think the equals and the hashcode should be implemented in the SchedulingRequest and not the SchedulingRequestPBImpl I think these discussions before in other JIRAs. For most cases actually using the protobuf equals and hashcode are actually better - and more efficient. Other objects such as PlacementConstraint etc. which are actually polymorphic and have true inheritance and sub classes - then we can push up the equals and hashcode to avoid code duplication. bq. Let's add a simple test that creates an allocate request with SchedulingRequests instead of ResourceRequests. [This|https://github.com/apache/hadoop/blob/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java#L434-L436] test is already doing that. It instantiates all sub-fields and verifies if they can individually be serialized or not. To be honest, v007 of the patch is good (if as remove of schedulingRequestList / schedulingRequests from the builder). Can you revert the remaining changes from v008 ? > [API] Add SchedulingRequest to the AllocateRequest > -------------------------------------------------- > > Key: YARN-7448 > URL: https://issues.apache.org/jira/browse/YARN-7448 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Arun Suresh > Assignee: Panagiotis Garefalakis > Attachments: YARN-7448-YARN-6592.001.patch, > YARN-7448-YARN-6592.002.patch, YARN-7448-YARN-6592.003.patch, > YARN-7448-YARN-6592.004.patch, YARN-7448-YARN-6592.005.patch, > YARN-7448-YARN-6592.006.patch, YARN-7448-YARN-6592.007.patch, > YARN-7448-YARN-6592.008.patch > > > YARN-6594 introduces the {{SchedulingRequest}}. This JIRA tracks the > inclusion of the SchedulingRequest into the AllocateRequest. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org