shuzirra commented on a change in pull request #2490:
URL: https://github.com/apache/hadoop/pull/2490#discussion_r532631326



##########
File path: 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/CSMappingPlacementRule.java
##########
@@ -181,6 +181,10 @@ private void setupGroupsForVariableContext(VariableContext 
vctx, String user)
       return;
     }
     Set<String> groupsSet = groups.getGroupsSet(user);
+    if (groupsSet.isEmpty()) {
+      LOG.warn("There are no groups for user {}", user);
+      return;

Review comment:
       Just to be sure the variable context is as consistent as possible, 
please add a 
   `vctx.putExtraDataset("groups", groupsSet);`
   before the return, empty set is a valid groups, at least it can be used by 
the matchers, not that it will ever match, but it's perhaps better than leaving 
it blank.
   As for primary and secondary groups there is not much we can do.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to