|
@@ -16,6 +16,8 @@
|
|
|
|
|
|
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.converter;
|
|
|
|
|
|
+import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration.AUTO_QUEUE_CREATION_V2_ENABLED;
|
|
|
+import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration.DEFAULT_AUTO_QUEUE_CREATION_ENABLED;
|
|
|
import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration.PREFIX;
|
|
|
import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration.DOT;
|
|
|
import static org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration.USER_LIMIT_FACTOR;
|
|
@@ -82,13 +84,13 @@ public class FSQueueConverter {
|
|
|
emitMaxParallelApps(queueName, queue);
|
|
|
emitMaxAllocations(queueName, queue);
|
|
|
emitPreemptionDisabled(queueName, queue);
|
|
|
- emitDefaultUserLimitFactor(queueName, children);
|
|
|
|
|
|
emitChildCapacity(queue);
|
|
|
emitMaximumCapacity(queueName, queue);
|
|
|
emitSizeBasedWeight(queueName);
|
|
|
emitOrderingPolicy(queueName, queue);
|
|
|
checkMaxChildCapacitySetting(queue);
|
|
|
+ emitDefaultUserLimitFactor(queueName, children);
|
|
|
|
|
|
for (FSQueue childQueue : children) {
|
|
|
convertQueueHierarchy(childQueue);
|
|
@@ -220,7 +222,7 @@ public class FSQueueConverter {
|
|
|
}
|
|
|
|
|
|
public void emitDefaultUserLimitFactor(String queueName, List<FSQueue> children) {
|
|
|
- if (children.isEmpty()) {
|
|
|
+ if (children.isEmpty() && checkAutoQueueCreationV2Disabled(queueName)) {
|
|
|
capacitySchedulerConfig.setFloat(
|
|
|
CapacitySchedulerConfiguration.
|
|
|
PREFIX + queueName + DOT + USER_LIMIT_FACTOR,
|
|
@@ -309,6 +311,12 @@ public class FSQueueConverter {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private boolean checkAutoQueueCreationV2Disabled(String queueName) {
|
|
|
+ return !capacitySchedulerConfig.getBoolean(
|
|
|
+ PREFIX + queueName + DOT + AUTO_QUEUE_CREATION_V2_ENABLED,
|
|
|
+ DEFAULT_AUTO_QUEUE_CREATION_ENABLED);
|
|
|
+ }
|
|
|
+
|
|
|
private String getQueueShortName(String queueName) {
|
|
|
int lastDot = queueName.lastIndexOf(".");
|
|
|
return queueName.substring(lastDot + 1);
|