YARN-4560. Make scheduler error checking message more user friendly. (Ray Chiang via kasha)
This commit is contained in:
parent
a888b5bc53
commit
3ef5500783
@ -235,12 +235,13 @@ private void validateConf(Configuration conf) {
|
|||||||
|
|
||||||
if (minMem < 0 || minMem > maxMem) {
|
if (minMem < 0 || minMem > maxMem) {
|
||||||
throw new YarnRuntimeException("Invalid resource scheduler memory"
|
throw new YarnRuntimeException("Invalid resource scheduler memory"
|
||||||
+ " allocation configuration"
|
+ " allocation configuration: "
|
||||||
+ ", " + YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB
|
+ YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB
|
||||||
+ "=" + minMem
|
+ "=" + minMem
|
||||||
+ ", " + YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB
|
+ ", " + YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_MB
|
||||||
+ "=" + maxMem + ", min should equal greater than 0"
|
+ "=" + maxMem + ". Both values must be greater than or equal to 0"
|
||||||
+ ", max should be no smaller than min.");
|
+ "and the maximum allocation value must be greater than or equal to"
|
||||||
|
+ "the minimum allocation value.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate scheduler vcores allocation setting
|
// validate scheduler vcores allocation setting
|
||||||
@ -253,12 +254,13 @@ private void validateConf(Configuration conf) {
|
|||||||
|
|
||||||
if (minVcores < 0 || minVcores > maxVcores) {
|
if (minVcores < 0 || minVcores > maxVcores) {
|
||||||
throw new YarnRuntimeException("Invalid resource scheduler vcores"
|
throw new YarnRuntimeException("Invalid resource scheduler vcores"
|
||||||
+ " allocation configuration"
|
+ " allocation configuration: "
|
||||||
+ ", " + YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_VCORES
|
+ YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_VCORES
|
||||||
+ "=" + minVcores
|
+ "=" + minVcores
|
||||||
+ ", " + YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES
|
+ ", " + YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES
|
||||||
+ "=" + maxVcores + ", min should equal greater than 0"
|
+ "=" + maxVcores + ". Both values must be greater than or equal to 0"
|
||||||
+ ", max should be no smaller than min.");
|
+ "and the maximum allocation value must be greater than or equal to"
|
||||||
|
+ "the minimum allocation value.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user