public class GuaranteedOrZeroCapacityOverTimePolicy extends Object implements AutoCreatedQueueManagementPolicy
Assigns capacity if available to leaf queues based on application submission order i.e leaf queues are assigned capacity in FCFS order based on application submission time. Updates leaf queue capacities to 0 when there are no pending or running apps under that queue.
| Constructor and Description |
|---|
GuaranteedOrZeroCapacityOverTimePolicy() |
| Modifier and Type | Method and Description |
|---|---|
void |
commitQueueManagementChanges(List<QueueManagementChange> queueManagementChanges)
Commit queue management changes - which involves updating required state
on parent/underlying leaf queues
|
List<QueueManagementChange> |
computeQueueManagementChanges()
Compute/Adjust child queue capacities
for auto created leaf queues
This computes queue entitlements but does not update LeafQueueState or
queue capacities.
|
float |
getAbsoluteActivatedChildQueueCapacity(String nodeLabel) |
AutoCreatedLeafQueueConfig |
getInitialLeafQueueConfiguration(AbstractAutoCreatedLeafQueue leafQueue)
Get initial template for the specified leaf queue
|
int |
getMaxLeavesToBeActivated(float availableCapacity,
float childQueueAbsoluteCapacity,
int numPendingApps) |
boolean |
hasPendingApps(AutoCreatedLeafQueue leafQueue) |
void |
init(CapacitySchedulerContext schedulerContext,
ParentQueue parentQueue)
Initialize policy
|
boolean |
isActive(AutoCreatedLeafQueue leafQueue,
String nodeLabel) |
void |
reinitialize(CapacitySchedulerContext schedulerContext,
ParentQueue parentQueue)
Reinitialize policy state ( if required )
|
public GuaranteedOrZeroCapacityOverTimePolicy()
public void init(CapacitySchedulerContext schedulerContext, ParentQueue parentQueue) throws IOException
AutoCreatedQueueManagementPolicyinit in interface AutoCreatedQueueManagementPolicyschedulerContext - Capacity Scheduler contextIOExceptionpublic List<QueueManagementChange> computeQueueManagementChanges() throws SchedulerDynamicEditException
computeQueueManagementChanges in interface AutoCreatedQueueManagementPolicySchedulerDynamicEditException - when compute queueManagement changes fails.public boolean isActive(AutoCreatedLeafQueue leafQueue, String nodeLabel) throws SchedulerDynamicEditException
SchedulerDynamicEditExceptionpublic int getMaxLeavesToBeActivated(float availableCapacity,
float childQueueAbsoluteCapacity,
int numPendingApps)
throws SchedulerDynamicEditException
SchedulerDynamicEditExceptionpublic void commitQueueManagementChanges(List<QueueManagementChange> queueManagementChanges) throws SchedulerDynamicEditException
commitQueueManagementChanges in interface AutoCreatedQueueManagementPolicyqueueManagementChanges - Queue Management changes to commitSchedulerDynamicEditException - when validation failspublic boolean hasPendingApps(AutoCreatedLeafQueue leafQueue)
public void reinitialize(CapacitySchedulerContext schedulerContext, ParentQueue parentQueue) throws IOException
AutoCreatedQueueManagementPolicyreinitialize in interface AutoCreatedQueueManagementPolicyschedulerContext - Capacity Scheduler contextIOExceptionpublic AutoCreatedLeafQueueConfig getInitialLeafQueueConfiguration(AbstractAutoCreatedLeafQueue leafQueue) throws SchedulerDynamicEditException
AutoCreatedQueueManagementPolicygetInitialLeafQueueConfiguration in interface AutoCreatedQueueManagementPolicyleafQueue - the leaf queueSchedulerDynamicEditExceptionpublic float getAbsoluteActivatedChildQueueCapacity(String nodeLabel)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.