[ https://issues.apache.org/jira/browse/YARN-9460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17130447#comment-17130447 ]
Peter Bacsko commented on YARN-9460: ------------------------------------ Another comment: {noformat} if (scheduler instanceof CapacityScheduler) { reservationsACLsManager = new CapacityReservationsACLsManager(scheduler, conf); } else if (scheduler instanceof FairScheduler) { reservationsACLsManager = new FairReservationsACLsManager(scheduler, conf); } {noformat} This is very similar to what I mentioned above. If neither CS nor FS is set, then this can cause an NPE. We need a ReservationsACLsManager which does nothing in a final else branch, eg. {{PassThroughReservationsACLsManager}} which always return true for {{checkAccess()}}. > QueueACLsManager and ReservationsACLManager should not use instanceof checks > ---------------------------------------------------------------------------- > > Key: YARN-9460 > URL: https://issues.apache.org/jira/browse/YARN-9460 > Project: Hadoop YARN > Issue Type: Improvement > Reporter: Szilard Nemeth > Assignee: Bilwa S T > Priority: Major > Attachments: YARN-9460.001.patch, YARN-9460.002.patch, > YARN-9460.003.patch, YARN-9460.004.patch > > > QueueACLsManager and ReservationsACLManager should not use instanceof checks > for the scheduler type. > Rather, we should abstract this into two classes: Capacity and Fair variants > of these ACL classes. > QueueACLsManager and ReservationsACLManager could be abstract classes, but > the implementation is the decision of one who will work on this jira. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org