YARN-10499. TestRouterWebServiceREST fails (#2490). Contributed by Akira Ajisaka

This commit is contained in:
Akira Ajisaka 2020-12-17 01:26:15 +09:00 committed by GitHub
parent df35c7f519
commit df7f1e5199
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -181,6 +181,11 @@ public class CSMappingPlacementRule extends PlacementRule {
return; return;
} }
Set<String> groupsSet = groups.getGroupsSet(user); Set<String> groupsSet = groups.getGroupsSet(user);
if (groupsSet.isEmpty()) {
LOG.warn("There are no groups for user {}", user);
vctx.putExtraDataset("groups", groupsSet);
return;
}
String secondaryGroup = null; String secondaryGroup = null;
Iterator<String> it = groupsSet.iterator(); Iterator<String> it = groupsSet.iterator();
String primaryGroup = it.next(); String primaryGroup = it.next();