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

View File

@ -181,6 +181,11 @@ 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);
vctx.putExtraDataset("groups", groupsSet);
return;
}
String secondaryGroup = null;
Iterator<String> it = groupsSet.iterator();
String primaryGroup = it.next();