YARN-10350. TestUserGroupMappingPlacementRule fails

Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
Bilwa S T 2020-07-14 11:13:10 +05:30 committed by Akira Ajisaka
parent 85d4718ed7
commit 8980c23fc2
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50
1 changed files with 8 additions and 2 deletions

View File

@ -50,7 +50,13 @@ public class SimpleGroupsMapping implements GroupMappingServiceProvider {
@Override
public Set<String> getGroupsSet(String user) throws IOException {
if ("admins".equals(user)) {
return ImmutableSet.of("root");
} else if ("nosecondarygroupuser".equals(user)) {
return ImmutableSet.of("primarygrouponly");
} else {
return ImmutableSet.of(user + "group", user + "subgroup1",
user + "subgroup2");
}
}
}