YARN-7482. Max applications calculation per queue has to be retrospected with absolute resource support. Contributed by Sunil G.
This commit is contained in:
parent
034b312d9f
commit
e65ca92fb6
@ -1088,6 +1088,26 @@ private void deriveCapacityFromAbsoluteConfigurations(String label,
|
|||||||
childQueue.getQueueCapacities().setAbsoluteMaximumCapacity(label,
|
childQueue.getQueueCapacities().setAbsoluteMaximumCapacity(label,
|
||||||
(float) childQueue.getQueueCapacities().getMaximumCapacity(label)
|
(float) childQueue.getQueueCapacities().getMaximumCapacity(label)
|
||||||
/ getQueueCapacities().getAbsoluteMaximumCapacity(label));
|
/ getQueueCapacities().getAbsoluteMaximumCapacity(label));
|
||||||
|
|
||||||
|
// Re-visit max applications for a queue based on absolute capacity if
|
||||||
|
// needed.
|
||||||
|
if (childQueue instanceof LeafQueue) {
|
||||||
|
LeafQueue leafQueue = (LeafQueue) childQueue;
|
||||||
|
CapacitySchedulerConfiguration conf = csContext.getConfiguration();
|
||||||
|
int maxApplications = (int) (conf.getMaximumSystemApplications()
|
||||||
|
* childQueue.getQueueCapacities().getAbsoluteCapacity(label));
|
||||||
|
leafQueue.setMaxApplications(maxApplications);
|
||||||
|
|
||||||
|
int maxApplicationsPerUser = Math.min(maxApplications,
|
||||||
|
(int) (maxApplications
|
||||||
|
* (leafQueue.getUsersManager().getUserLimit() / 100.0f)
|
||||||
|
* leafQueue.getUsersManager().getUserLimitFactor()));
|
||||||
|
leafQueue.setMaxApplicationsPerUser(maxApplicationsPerUser);
|
||||||
|
LOG.info("LeafQueue:" + leafQueue.getQueueName() + ", maxApplications="
|
||||||
|
+ maxApplications + ", maxApplicationsPerUser="
|
||||||
|
+ maxApplicationsPerUser + ", Abs Cap:"
|
||||||
|
+ childQueue.getQueueCapacities().getAbsoluteCapacity(label));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user