protected void setupConfigurableCapacities( CapacitySchedulerConfiguration configuration) { CSQueueUtils.loadUpdateAndCheckCapacities( getQueuePath(), configuration, queueCapacities, parent == null ? null : parent.getQueueCapacities()); }
private Map<String, Float> getUserWeightsFromHierarchy (CapacitySchedulerConfiguration configuration) throws IOException { Map<String, Float> unionInheritedWeights = new HashMap<String, Float>(); CSQueue parentQ = getParent(); if (parentQ != null) { // Inherit all of parent's user's weights unionInheritedWeights.putAll(parentQ.getUserWeights()); } // Insert this queue's user's weights, overriding parent's user's weights if // there is overlap. unionInheritedWeights.putAll( configuration.getAllUserWeightsForQueue(getQueuePath())); return unionInheritedWeights; }
protected void setupConfigurableCapacities() { CSQueueUtils.loadUpdateAndCheckCapacities( getQueuePath(), csContext.getConfiguration(), queueCapacities, parent == null ? null : parent.getQueueCapacities()); }
protected void setupConfigurableCapacities() { CSQueueUtils.loadUpdateAndCheckCapacities( getQueuePath(), csContext.getConfiguration(), queueCapacities, parent == null ? null : parent.getQueueCapacities()); }
public void recoverDrainingState() { try { this.writeLock.lock(); if (getState() == QueueState.STOPPED) { updateQueueState(QueueState.DRAINING); } LOG.info("Recover draining state for queue " + this.getQueuePath()); if (getParent() != null && getParent().getState() == QueueState.STOPPED) { ((AbstractCSQueue) getParent()).recoverDrainingState(); } } finally { this.writeLock.unlock(); } }
configuration.getAccessibleNodeLabels(getQueuePath()); this.defaultLabelExpression = configuration.getDefaultNodeLabelExpression( getQueuePath()); this.resourceTypes = new HashSet<String>(); for (AbsoluteResourceType type : AbsoluteResourceType.values()) { updateConfigurableResourceRequirement(getQueuePath(), clusterResource); getQueuePath()); .getConfiguredState(getQueuePath()); QueueState parentState = (parent == null) ? null : parent.getState(); initializeQueueState(previous, configuredState, parentState); this.acls = configuration.getAcls(getQueuePath()); getQueuePath()); configuration.getMultiNodesSortingAlgorithmPolicy(getQueuePath()));
csContext.getConfiguration().getAccessibleNodeLabels(getQueuePath()); this.defaultLabelExpression = csContext.getConfiguration() .getDefaultNodeLabelExpression(getQueuePath()); getQueuePath()); this.state = csContext.getConfiguration().getState(getQueuePath()); this.acls = csContext.getConfiguration().getAcls(getQueuePath());
csContext.getConfiguration().getAccessibleNodeLabels(getQueuePath()); this.defaultLabelExpression = csContext.getConfiguration() .getDefaultNodeLabelExpression(getQueuePath()); getQueuePath()); this.state = csContext.getConfiguration().getState(getQueuePath()); this.acls = csContext.getConfiguration().getAcls(getQueuePath());
public AbstractCSQueue(CapacitySchedulerContext cs, CapacitySchedulerConfiguration configuration, String queueName, CSQueue parent, CSQueue old) { 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(); // must be called after parent and queueName is set this.metrics = old != null ? (CSQueueMetrics) old.getMetrics() : CSQueueMetrics.forQueue(getQueuePath(), parent, cs.getConfiguration().getEnableUserMetrics(), cs.getConf()); this.csContext = cs; this.minimumAllocation = csContext.getMinimumResourceCapability(); // initialize ResourceUsage queueUsage = new ResourceUsage(); queueEntity = new PrivilegedEntity(EntityType.QUEUE, getQueuePath()); // initialize QueueCapacities queueCapacities = new QueueCapacities(parent == null); // initialize queueResourceQuotas queueResourceQuotas = new QueueResourceQuotas(); ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); readLock = lock.readLock(); writeLock = lock.writeLock(); }
public AbstractCSQueue(CapacitySchedulerContext cs, String queueName, CSQueue parent, CSQueue old) throws IOException { this.labelManager = cs.getRMContext().getNodeLabelManager(); this.parent = parent; this.queueName = queueName; this.resourceCalculator = cs.getResourceCalculator(); // must be called after parent and queueName is set this.metrics = old != null ? old.getMetrics() : QueueMetrics.forQueue(getQueuePath(), parent, cs.getConfiguration().getEnableUserMetrics(), cs.getConf()); this.csContext = cs; this.minimumAllocation = csContext.getMinimumResourceCapability(); // initialize ResourceUsage queueUsage = new ResourceUsage(); queueEntity = new PrivilegedEntity(EntityType.QUEUE, getQueuePath()); // initialize QueueCapacities queueCapacities = new QueueCapacities(parent == null); }
public AbstractCSQueue(CapacitySchedulerContext cs, String queueName, CSQueue parent, CSQueue old) throws IOException { this.labelManager = cs.getRMContext().getNodeLabelManager(); this.parent = parent; this.queueName = queueName; this.resourceCalculator = cs.getResourceCalculator(); // must be called after parent and queueName is set this.metrics = old != null ? old.getMetrics() : QueueMetrics.forQueue(getQueuePath(), parent, cs.getConfiguration().getEnableUserMetrics(), cs.getConf()); this.csContext = cs; this.minimumAllocation = csContext.getMinimumResourceCapability(); // initialize ResourceUsage queueUsage = new ResourceUsage(); queueEntity = new PrivilegedEntity(EntityType.QUEUE, getQueuePath()); // initialize QueueCapacities queueCapacities = new QueueCapacities(parent == null); }