[ https://issues.apache.org/jira/browse/YARN-9840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16935757#comment-16935757 ]
Peter Bacsko commented on YARN-9840: ------------------------------------ Thanks for the patch [~maniraj...@gmail.com]. I triggered a Jenkins build. Just some minor things: 1. {noformat} 177 for (int i = 178 1; i < groupsList.size(); i++) { 179 if (this.queueManager.getQueue(groupsList.get(i)) != null) { 180 secondaryGroup = groupsList.get(i); 181 break; 182 } 183 } {noformat} Line feed is unnecessary after {{int i =}}. 2. What if there's no secondary group and we return {{null}}? Can't it cause an NPE somewhere else? 3. {noformat} 475 @VisibleForTesting 476 public void setQueueManager(CapacitySchedulerQueueManager queueManager) { 477 this.queueManager = 478 queueManager; 479 } {noformat} No need for line feed after "=". Also, if this method is only used for testing, reduce the visibility to package private. 4. Extend unit tests with an extra case when there's no secondary group associated with a given user. > Capacity scheduler: add support for Secondary Group rule mapping > ---------------------------------------------------------------- > > Key: YARN-9840 > URL: https://issues.apache.org/jira/browse/YARN-9840 > Project: Hadoop YARN > Issue Type: Improvement > Components: capacity scheduler > Reporter: Peter Bacsko > Assignee: Manikandan R > Priority: Major > Attachments: YARN-9840.001.patch > > > Currently, Capacity Scheduler only supports primary group rule mapping like > this: > {{u:%user:%primary_group}} > Fair scheduler already supports secondary group placement rule. Let's add > this to CS to reduce the feature gap. > Class of interest: > https://github.com/apache/hadoop/blob/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/UserGroupMappingPlacementRule.java -- 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