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
AutoCreatedQueueManagementPolicy
init
in interface AutoCreatedQueueManagementPolicy
schedulerContext
- Capacity Scheduler contextIOException
public List<QueueManagementChange> computeQueueManagementChanges() throws SchedulerDynamicEditException
computeQueueManagementChanges
in interface AutoCreatedQueueManagementPolicy
SchedulerDynamicEditException
public boolean isActive(AutoCreatedLeafQueue leafQueue, String nodeLabel) throws SchedulerDynamicEditException
SchedulerDynamicEditException
public int getMaxLeavesToBeActivated(float availableCapacity, float childQueueAbsoluteCapacity, int numPendingApps) throws SchedulerDynamicEditException
SchedulerDynamicEditException
public void commitQueueManagementChanges(List<QueueManagementChange> queueManagementChanges) throws SchedulerDynamicEditException
commitQueueManagementChanges
in interface AutoCreatedQueueManagementPolicy
queueManagementChanges
- Queue Management changes to commitSchedulerDynamicEditException
- when validation failspublic boolean hasPendingApps(AutoCreatedLeafQueue leafQueue)
public void reinitialize(CapacitySchedulerContext schedulerContext, ParentQueue parentQueue) throws IOException
AutoCreatedQueueManagementPolicy
reinitialize
in interface AutoCreatedQueueManagementPolicy
schedulerContext
- Capacity Scheduler contextIOException
public AutoCreatedLeafQueueConfig getInitialLeafQueueConfiguration(AbstractAutoCreatedLeafQueue leafQueue) throws SchedulerDynamicEditException
AutoCreatedQueueManagementPolicy
getInitialLeafQueueConfiguration
in interface AutoCreatedQueueManagementPolicy
leafQueue
- the leaf queueSchedulerDynamicEditException
public float getAbsoluteActivatedChildQueueCapacity(String nodeLabel)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.