p-szucs commented on code in PR #5332:
URL: https://github.com/apache/hadoop/pull/5332#discussion_r1232477817
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/conf/ConfigurationUpdateAssembler.java:
##########
@@ -76,19 +76,20 @@ private static void removeQueue(
throw new IOException("Queue " + queueToRemove + " not found");
}
siblingQueues.remove(queueName);
- String parentQueuePath = queueToRemove.substring(0, queueToRemove
+ String parentPath = queueToRemove.substring(0, queueToRemove
.lastIndexOf('.'));
+ QueuePath parentQueuePath = new QueuePath(parentPath);
proposedConf.setQueues(parentQueuePath, siblingQueues.toArray(
new String[0]));
String queuesConfig = CapacitySchedulerConfiguration.PREFIX
- + parentQueuePath + CapacitySchedulerConfiguration.DOT
+ + parentPath + CapacitySchedulerConfiguration.DOT
+ CapacitySchedulerConfiguration.QUEUES;
if (siblingQueues.isEmpty()) {
confUpdate.put(queuesConfig, null);
// Unset Ordering Policy of Leaf Queue converted from
// Parent Queue after removeQueue
String queueOrderingPolicy = CapacitySchedulerConfiguration.PREFIX
- + parentQueuePath + CapacitySchedulerConfiguration.DOT
+ + parentPath + CapacitySchedulerConfiguration.DOT
+ ORDERING_POLICY;
proposedConf.unset(queueOrderingPolicy);
confUpdate.put(queueOrderingPolicy, null);
Review Comment:
Sure, actually most of them were already present in the QueuePath class,
like getting the parent or the leaf part of a queue path. I refactored this
class to use QueuePath here as well, to eliminate the string operations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]