YARN-6917. Queue path is recomputed from scratch on every allocation. Contributed by Eric Payne
This commit is contained in:
parent
3325ef653d
commit
5558792894
@ -76,6 +76,7 @@ public abstract class AbstractCSQueue implements CSQueue {
|
||||
private static final Log LOG = LogFactory.getLog(AbstractCSQueue.class);
|
||||
volatile CSQueue parent;
|
||||
final String queueName;
|
||||
private final String queuePath;
|
||||
volatile int numContainers;
|
||||
|
||||
final Resource minimumAllocation;
|
||||
@ -119,6 +120,8 @@ public AbstractCSQueue(CapacitySchedulerContext cs,
|
||||
this.labelManager = cs.getRMContext().getNodeLabelManager();
|
||||
this.parent = parent;
|
||||
this.queueName = queueName;
|
||||
this.queuePath =
|
||||
((parent == null) ? "" : (parent.getQueuePath() + ".")) + this.queueName;
|
||||
this.resourceCalculator = cs.getResourceCalculator();
|
||||
this.activitiesManager = cs.getActivitiesManager();
|
||||
|
||||
@ -150,6 +153,11 @@ protected void setupConfigurableCapacities() {
|
||||
queueCapacities,
|
||||
parent == null ? null : parent.getQueueCapacities());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getQueuePath() {
|
||||
return queuePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getCapacity() {
|
||||
|
@ -299,11 +299,6 @@ protected void setupQueueConfigs(Resource clusterResource)
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getQueuePath() {
|
||||
return getParent().getQueuePath() + "." + getQueueName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used only by tests.
|
||||
*/
|
||||
|
@ -198,12 +198,6 @@ void setChildQueues(Collection<CSQueue> childQueues) {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getQueuePath() {
|
||||
String parentPath = ((parent == null) ? "" : (parent.getQueuePath() + "."));
|
||||
return parentPath + getQueueName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueueInfo getQueueInfo(
|
||||
boolean includeChildQueues, boolean recursive) {
|
||||
|
Loading…
Reference in New Issue
Block a user