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()
Computes / adjusts child queue capacities for auto created leaf queues.
|
float |
getAbsoluteActivatedChildQueueCapacity(String nodeLabel) |
AutoCreatedLeafQueueConfig |
getInitialLeafQueueConfiguration(AbstractAutoCreatedLeafQueue leafQueue)
Get initial template for the specified leaf queue.
|
boolean |
hasPendingApps(AutoCreatedLeafQueue leafQueue) |
void |
init(AbstractParentQueue parentQueue)
Initialize policy.
|
boolean |
isActive(AutoCreatedLeafQueue leafQueue,
String nodeLabel) |
void |
reinitialize(AbstractParentQueue parentQueue)
Reinitialize policy state ( if required ).
|
void |
updateTemplateAbsoluteCapacities(QueueCapacities queueCapacities) |
public GuaranteedOrZeroCapacityOverTimePolicy()
public void init(AbstractParentQueue parentQueue) throws IOException
AutoCreatedQueueManagementPolicy
init
in interface AutoCreatedQueueManagementPolicy
parentQueue
- parent queueIOException
- an I/O exception has occurred.public List<QueueManagementChange> computeQueueManagementChanges() throws SchedulerDynamicEditException
computeQueueManagementChanges
in interface AutoCreatedQueueManagementPolicy
SchedulerDynamicEditException
- when compute queueManagement changes fails.public void updateTemplateAbsoluteCapacities(QueueCapacities queueCapacities)
@VisibleForTesting public boolean isActive(AutoCreatedLeafQueue leafQueue, String nodeLabel) 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(AbstractParentQueue parentQueue) throws IOException
AutoCreatedQueueManagementPolicy
reinitialize
in interface AutoCreatedQueueManagementPolicy
parentQueue
- parent queueIOException
- an I/O exception has occurred.public AutoCreatedLeafQueueConfig getInitialLeafQueueConfiguration(AbstractAutoCreatedLeafQueue leafQueue) throws SchedulerDynamicEditException
AutoCreatedQueueManagementPolicy
getInitialLeafQueueConfiguration
in interface AutoCreatedQueueManagementPolicy
leafQueue
- the leaf queueSchedulerDynamicEditException
- when get initialLeafQueue Configuration fails.@VisibleForTesting public float getAbsoluteActivatedChildQueueCapacity(String nodeLabel)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.