Skip to content

Commit fb030f3

Browse files
Revert "FS-CS converter: nestedUserQueue with default rule results in invalid queue mapping. Contributed by Gergely Pollak"
This reverts commit ac4540d. Reverting because of missing Jira-ID in the commit message.
1 parent c30c23c commit fb030f3

File tree

2 files changed

+2
-33
lines changed

2 files changed

+2
-33
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -992,14 +992,12 @@ private void addApplication(ApplicationId applicationId, String queueName,
992992
// not auto-created above, then its parent queue should match
993993
// the parent queue specified in queue mapping
994994
} else if (!queue.getParent().getQueueShortName().equals(
995-
placementContext.getParentQueue())
996-
&& !queue.getParent().getQueuePath().equals(
997-
placementContext.getParentQueue())) {
995+
placementContext.getParentQueue())) {
998996
String message =
999997
"Auto created Leaf queue " + placementContext.getQueue() + " "
1000998
+ "already exists under queue : " + queue
1001999
.getParent().getQueueShortName()
1002-
+ ". But Queue mapping configuration " +
1000+
+ ".But Queue mapping configuration " +
10031001
CapacitySchedulerConfiguration.QUEUE_MAPPING + " has been "
10041002
+ "updated to a different parent queue : "
10051003
+ placementContext.getParentQueue()

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerAutoQueueCreation.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -162,35 +162,6 @@ public void testAutoCreateLeafQueueCreation() throws Exception {
162162
}
163163
}
164164

165-
@Test(timeout = 20000)
166-
public void testAutoCreateLeafQueueCreationUsingFullParentPath()
167-
throws Exception {
168-
169-
try {
170-
setupGroupQueueMappings("root.d", cs.getConfiguration(), "%user");
171-
cs.reinitialize(cs.getConfiguration(), mockRM.getRMContext());
172-
173-
submitApp(mockRM, cs.getQueue("d"), TEST_GROUPUSER, TEST_GROUPUSER, 1, 1);
174-
AutoCreatedLeafQueue autoCreatedLeafQueue =
175-
(AutoCreatedLeafQueue) cs.getQueue(TEST_GROUPUSER);
176-
ManagedParentQueue parentQueue = (ManagedParentQueue) cs.getQueue("d");
177-
assertEquals(parentQueue, autoCreatedLeafQueue.getParent());
178-
179-
Map<String, Float> expectedChildQueueAbsCapacity =
180-
new HashMap<String, Float>() {{
181-
put(NO_LABEL, 0.02f);
182-
}};
183-
184-
validateInitialQueueEntitlement(parentQueue, TEST_GROUPUSER,
185-
expectedChildQueueAbsCapacity,
186-
new HashSet<String>() {{ add(NO_LABEL); }});
187-
188-
} finally {
189-
cleanupQueue(USER0);
190-
cleanupQueue(TEST_GROUPUSER);
191-
}
192-
}
193-
194165
@Test
195166
public void testReinitializeStoppedAutoCreatedLeafQueue() throws Exception {
196167
try {

0 commit comments

Comments
 (0)