@InterfaceAudience.Private @InterfaceStability.Unstable public class CapacitySchedulerQueueManager extends Object implements SchedulerQueueManager<CSQueue,CapacitySchedulerConfiguration>
Constructor and Description |
---|
CapacitySchedulerQueueManager(org.apache.hadoop.conf.Configuration conf,
RMNodeLabelsManager labelManager,
AppPriorityACLsManager appPriorityACLManager)
Construct the service.
|
Modifier and Type | Method and Description |
---|---|
void |
addLegacyDynamicQueue(Queue queue)
Adds an
AutoCreatedLeafQueue to the manager collection and extends
the children collection of its parent. |
void |
addQueue(String queueName,
CSQueue queue)
Add a new queue to the existing queues.
|
AbstractLeafQueue |
createQueue(QueuePath queue)
Auto creates a LeafQueue and its upper hierarchy given a path at runtime.
|
List<String> |
determineMissingParents(QueuePath queue)
Determines the missing parent paths of a potentially auto creatable queue.
|
AbstractLeafQueue |
getAndCheckLeafQueue(String queue)
Check that the String provided in input is the name of an existing,
LeafQueue, if successful returns the queue.
|
ConfiguredNodeLabels |
getConfiguredNodeLabelsForAllQueues()
Get
ConfiguredNodeLabels which contains the configured node labels
for all queues. |
org.apache.hadoop.yarn.api.records.Priority |
getDefaultPriorityForQueue(String queueName)
Get the default priority of the queue.
|
List<org.apache.hadoop.yarn.security.Permission> |
getPermissionsForDynamicQueue(QueuePath queuePath,
CapacitySchedulerConfiguration csConf) |
CSQueue |
getQueue(String queueName)
Get a queue matching the specified queue name.
|
CSQueue |
getQueueByFullName(String name) |
CapacitySchedulerQueueCapacityHandler |
getQueueCapacityHandler() |
Map<String,CSQueue> |
getQueues()
Get all the queues.
|
QueueStateManager<CSQueue,CapacitySchedulerConfiguration> |
getQueueStateManager() |
CSQueue |
getRootQueue()
Get the root queue.
|
Map<String,CSQueue> |
getShortNameQueues() |
void |
initializeQueues(CapacitySchedulerConfiguration conf)
Initialized the queues.
|
boolean |
isAmbiguous(String shortName) |
void |
reinitConfiguredNodeLabels(CapacitySchedulerConfiguration conf) |
void |
reinitializeQueues(CapacitySchedulerConfiguration newConf)
Reinitialize the queues.
|
void |
removeLegacyDynamicQueue(String queueName)
Removes an
AutoCreatedLeafQueue from the manager collection and
from its parent children collection. |
void |
removeQueue(String queueName)
Remove the queue from the existing queue.
|
void |
setCapacitySchedulerContext(CapacitySchedulerContext capacitySchedulerContext)
Set the CapacitySchedulerContext.
|
static void |
setQueueAcls(org.apache.hadoop.yarn.security.YarnAuthorizationProvider authorizer,
AppPriorityACLsManager appPriorityACLManager,
CSQueueStore queues) |
protected void |
setRootQueue(CSQueue rootQueue) |
public CapacitySchedulerQueueManager(org.apache.hadoop.conf.Configuration conf, RMNodeLabelsManager labelManager, AppPriorityACLsManager appPriorityACLManager)
conf
- the configurationlabelManager
- the labelManagerappPriorityACLManager
- App priority ACL managerpublic CSQueue getRootQueue()
SchedulerQueueManager
getRootQueue
in interface SchedulerQueueManager<CSQueue,CapacitySchedulerConfiguration>
@VisibleForTesting protected void setRootQueue(CSQueue rootQueue)
public Map<String,CSQueue> getQueues()
SchedulerQueueManager
getQueues
in interface SchedulerQueueManager<CSQueue,CapacitySchedulerConfiguration>
public void removeQueue(String queueName)
SchedulerQueueManager
removeQueue
in interface SchedulerQueueManager<CSQueue,CapacitySchedulerConfiguration>
queueName
- the queue namepublic void addQueue(String queueName, CSQueue queue)
SchedulerQueueManager
addQueue
in interface SchedulerQueueManager<CSQueue,CapacitySchedulerConfiguration>
queueName
- the queue namequeue
- the queue objectpublic CSQueue getQueue(String queueName)
SchedulerQueueManager
getQueue
in interface SchedulerQueueManager<CSQueue,CapacitySchedulerConfiguration>
queueName
- the queue namepublic boolean isAmbiguous(String shortName)
public void setCapacitySchedulerContext(CapacitySchedulerContext capacitySchedulerContext)
capacitySchedulerContext
- the CapacitySchedulerContextpublic void initializeQueues(CapacitySchedulerConfiguration conf) throws IOException
conf
- the CapacitySchedulerConfigurationIOException
- if fails to initialize queuespublic void reinitializeQueues(CapacitySchedulerConfiguration newConf) throws IOException
SchedulerQueueManager
reinitializeQueues
in interface SchedulerQueueManager<CSQueue,CapacitySchedulerConfiguration>
newConf
- the configurationIOException
- if fails to re-initialize queues@VisibleForTesting public static void setQueueAcls(org.apache.hadoop.yarn.security.YarnAuthorizationProvider authorizer, AppPriorityACLsManager appPriorityACLManager, CSQueueStore queues) throws IOException
IOException
public AbstractLeafQueue getAndCheckLeafQueue(String queue) throws org.apache.hadoop.yarn.exceptions.YarnException
queue
- the queue nameorg.apache.hadoop.yarn.exceptions.YarnException
- if the queue does not exist or the queue
is not the type of LeafQueue.public org.apache.hadoop.yarn.api.records.Priority getDefaultPriorityForQueue(String queueName)
queueName
- the queue name@InterfaceAudience.Private public QueueStateManager<CSQueue,CapacitySchedulerConfiguration> getQueueStateManager()
public CapacitySchedulerQueueCapacityHandler getQueueCapacityHandler()
public void removeLegacyDynamicQueue(String queueName) throws SchedulerDynamicEditException
AutoCreatedLeafQueue
from the manager collection and
from its parent children collection.queueName
- queue to be removedSchedulerDynamicEditException
- if queue is not eligible for deletionpublic void addLegacyDynamicQueue(Queue queue) throws SchedulerDynamicEditException, IOException
AutoCreatedLeafQueue
to the manager collection and extends
the children collection of its parent.queue
- to be addedSchedulerDynamicEditException
- if queue is not eligible to be addedIOException
- if parent can not accept the queuepublic AbstractLeafQueue createQueue(QueuePath queue) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
queue
- the application placement information of the queueorg.apache.hadoop.yarn.exceptions.YarnException
- if the given path is not eligible to be auto createdIOException
- if the given path can not be added to the parentpublic List<String> determineMissingParents(QueuePath queue) throws SchedulerDynamicEditException
queue
- to be auto createdSchedulerDynamicEditException
- if the given queue is not eligible
to be auto createdpublic List<org.apache.hadoop.yarn.security.Permission> getPermissionsForDynamicQueue(QueuePath queuePath, CapacitySchedulerConfiguration csConf)
public ConfiguredNodeLabels getConfiguredNodeLabelsForAllQueues()
ConfiguredNodeLabels
which contains the configured node labels
for all queues.@VisibleForTesting public void reinitConfiguredNodeLabels(CapacitySchedulerConfiguration conf)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.