Skip to content

Commit 8980c23

Browse files
BilwaSTaajisaka
authored andcommitted
YARN-10350. TestUserGroupMappingPlacementRule fails
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
1 parent 85d4718 commit 8980c23

File tree

1 file changed

+8
-2
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair

1 file changed

+8
-2
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/SimpleGroupsMapping.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ public void cacheGroupsAdd(List<String> groups) throws IOException {
5050

5151
@Override
5252
public Set<String> getGroupsSet(String user) throws IOException {
53-
return ImmutableSet.of(user + "group", user + "subgroup1",
54-
user + "subgroup2");
53+
if ("admins".equals(user)) {
54+
return ImmutableSet.of("root");
55+
} else if ("nosecondarygroupuser".equals(user)) {
56+
return ImmutableSet.of("primarygrouponly");
57+
} else {
58+
return ImmutableSet.of(user + "group", user + "subgroup1",
59+
user + "subgroup2");
60+
}
5561
}
5662
}

0 commit comments

Comments
 (0)