YARN-2726. CapacityScheduler should explicitly log when an accessible label has no capacity. Contributed by Wangda Tan
This commit is contained in:
parent
baf794dc40
commit
ce1a4419a6
|
@ -763,6 +763,9 @@ Release 2.6.0 - UNRELEASED
|
||||||
YARN-2734. Skipped sub-folders in the local log dir when aggregating logs.
|
YARN-2734. Skipped sub-folders in the local log dir when aggregating logs.
|
||||||
(Xuan Gong via zjshen)
|
(Xuan Gong via zjshen)
|
||||||
|
|
||||||
|
YARN-2726. CapacityScheduler should explicitly log when an accessible
|
||||||
|
label has no capacity. (Wangda Tan via xgong)
|
||||||
|
|
||||||
Release 2.5.1 - 2014-09-05
|
Release 2.5.1 - 2014-09-05
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -466,12 +466,19 @@ public class CapacitySchedulerConfiguration extends Configuration {
|
||||||
nodeLabelCapacities.put(label, 1.0f);
|
nodeLabelCapacities.put(label, 1.0f);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
float capacity =
|
String capacityPropertyName = getNodeLabelPrefix(queue, label) + CAPACITY;
|
||||||
getFloat(getNodeLabelPrefix(queue, label) + CAPACITY, UNDEFINED);
|
float capacity = getFloat(capacityPropertyName, UNDEFINED);
|
||||||
|
if (capacity == UNDEFINED) {
|
||||||
|
throw new IllegalArgumentException("Configuration issue: "
|
||||||
|
+ " node-label=" + label + " is accessible from queue=" + queue
|
||||||
|
+ " but has no capacity set, you should set "
|
||||||
|
+ capacityPropertyName + " in range of [0, 100].");
|
||||||
|
}
|
||||||
if (capacity < MINIMUM_CAPACITY_VALUE
|
if (capacity < MINIMUM_CAPACITY_VALUE
|
||||||
|| capacity > MAXIMUM_CAPACITY_VALUE) {
|
|| capacity > MAXIMUM_CAPACITY_VALUE) {
|
||||||
throw new IllegalArgumentException("Illegal " + "capacity of "
|
throw new IllegalArgumentException("Illegal capacity of " + capacity
|
||||||
+ capacity + " for label=" + label + " in queue=" + queue);
|
+ " for node-label=" + label + " in queue=" + queue
|
||||||
|
+ ", valid capacity should in range of [0, 100].");
|
||||||
}
|
}
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.debug("CSConf - getCapacityOfLabel: prefix="
|
LOG.debug("CSConf - getCapacityOfLabel: prefix="
|
||||||
|
|
Loading…
Reference in New Issue