for (String q1 : preemptionContext.getLeafQueueNames()) { for (String q2 : preemptionContext.getLeafQueueNames()) {
for (String leafQueue : preemptionContext.getLeafQueueNames()) { queueToPreemptableResourceByPartition.put(leafQueue, CapacitySchedulerPreemptionUtils
public void computeIdealAllocation(Resource clusterResource, Resource totalPreemptionAllowed) { for (String partition : context.getAllPartitions()) { TempQueuePerPartition tRoot = context.getQueueByPartition( CapacitySchedulerConfiguration.ROOT, partition); updatePreemptableExtras(tRoot); // compute the ideal distribution of resources among queues // updates cloned queues state accordingly tRoot.initializeRootIdealWithGuarangeed(); recursivelyComputeIdealAssignment(tRoot, totalPreemptionAllowed); } // based on ideal allocation select containers to be preempted from each // calculate resource-to-obtain by partition for each leaf queues calculateResToObtainByPartitionForLeafQueues(context.getLeafQueueNames(), clusterResource); } }
for (String queueName : preemptionContext.getLeafQueueNames()) {