tomicooler commented on code in PR #5783:
URL: https://github.com/apache/hadoop/pull/5783#discussion_r1252663785
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java:
##########
@@ -384,6 +388,38 @@ protected void setupQueueConfigs(Resource clusterResource)
throws
.parseConfiguredMaximumCapacityVector(queuePath.getFullPath(),
this.queueNodeLabelsSettings.getConfiguredNodeLabels(),
QueueCapacityVector.newInstance());
+
+ // Preserving the capacities set by Entitlements
+ if (this instanceof ReservationQueue ||
+ this instanceof PlanQueue) {
+ for (final String label :
queueNodeLabelsSettings.getConfiguredNodeLabels()) {
+ setConfiguredMinCapacityVector(label,
+ QueueCapacityVector.of(queueCapacities.getCapacity(label) * 100,
+ QueueCapacityVector.ResourceUnitCapacityType.PERCENTAGE));
+ setConfiguredMaxCapacityVector(label,
+ QueueCapacityVector.of(queueCapacities.getMaximumCapacity(label)
* 100,
+ QueueCapacityVector.ResourceUnitCapacityType.PERCENTAGE));
+ }
+ }
+
+ // Re-adjust weight when mixed capacity type is used. 5w == [memory=5w,
vcores=5w]
Review Comment:
Yes, e.g.: `testSchedulerAbsoluteAndWeightUsingCapacityVector`
--
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]