YARN-10813. Set default capacity of root for node labels. Contributed by Andras Gyori
This commit is contained in:
parent
428478bbe2
commit
6562391737
@ -800,10 +800,11 @@ private float internalGetLabeledQueueCapacity(String queue, String label,
|
|||||||
// root.From AbstractCSQueue, absolute resource, and weight will be parsed
|
// root.From AbstractCSQueue, absolute resource, and weight will be parsed
|
||||||
// and updated separately. Once nodes are added/removed in cluster,
|
// and updated separately. Once nodes are added/removed in cluster,
|
||||||
// capacity is percentage will also be re-calculated.
|
// capacity is percentage will also be re-calculated.
|
||||||
return defaultValue;
|
return queue.equals("root") ? 100.0f : defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
float capacity = getFloat(capacityPropertyName, defaultValue);
|
float capacity = queue.equals("root") ? 100.0f
|
||||||
|
: getFloat(capacityPropertyName, defaultValue);
|
||||||
if (capacity < MINIMUM_CAPACITY_VALUE
|
if (capacity < MINIMUM_CAPACITY_VALUE
|
||||||
|| capacity > MAXIMUM_CAPACITY_VALUE) {
|
|| capacity > MAXIMUM_CAPACITY_VALUE) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
|
Loading…
Reference in New Issue
Block a user