@InterfaceAudience.Private @InterfaceStability.Unstable public class QueueManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ROOT_QUEUE |
Constructor and Description |
---|
QueueManager(FairScheduler scheduler) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(String name)
Return whether a queue exists already.
|
FSLeafQueue |
getLeafQueue(String name,
boolean create)
Get a leaf queue by name, creating it if the create param is
true and the queue does not exist. |
FSLeafQueue |
getLeafQueue(String name,
boolean create,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Get a leaf queue by name, creating it if the create param is
true and the queue does not exist. |
Collection<FSLeafQueue> |
getLeafQueues()
Get a collection of all leaf queues.
|
FSParentQueue |
getParentQueue(String name,
boolean create)
Get a parent queue by name, creating it if the create param is
true and the queue does not exist. |
FSParentQueue |
getParentQueue(String name,
boolean create,
boolean recomputeSteadyShares)
Get a parent queue by name, creating it if the create param is
true and the queue does not exist. |
FSQueue |
getQueue(String name)
Gets a queue by name.
|
Collection<FSQueue> |
getQueues()
Get a collection of all queues.
|
FSParentQueue |
getRootQueue() |
void |
initialize(org.apache.hadoop.conf.Configuration conf) |
void |
removeEmptyDynamicQueues()
Removes all empty dynamic queues (including empty dynamic parent queues).
|
boolean |
removeLeafQueue(String name)
Remove a leaf queue if empty.
|
void |
removePendingIncompatibleQueues()
Re-checking incompatible queues that could not be removed earlier due to
not being empty, and removing those that became empty.
|
protected void |
setQueuesToDynamic(Set<String> queueNames)
Setting a set of queues to dynamic.
|
void |
updateAllocationConfiguration(AllocationConfiguration queueConf) |
public static final String ROOT_QUEUE
public QueueManager(FairScheduler scheduler)
public FSParentQueue getRootQueue()
public void initialize(org.apache.hadoop.conf.Configuration conf) throws IOException, SAXException, AllocationConfigurationException, ParserConfigurationException
public FSLeafQueue getLeafQueue(String name, boolean create)
true
and the queue does not exist.
If the queue is not or can not be a leaf queue, i.e. it already exists as
a parent queue, or one of the parents in its name is already a leaf queue,
null
is returned.
The root part of the name is optional, so a queue underneath the root
named "queue1" could be referred to as just "queue1", and a queue named
"queue2" underneath a parent named "parent1" that is underneath the root
could be referred to as just "parent1.queue2".name
- name of the queuecreate
- true
if the queue must be created if it does
not exist, false
otherwisenull
if the queue cannot be foundpublic FSLeafQueue getLeafQueue(String name, boolean create, org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
true
and the queue does not exist.
If the queue is not or can not be a leaf queue, i.e. it already exists as
a parent queue, or one of the parents in its name is already a leaf queue,
null
is returned.
If the application will be assigned to the queue if the applicationId is
not null
name
- name of the queuecreate
- true
if the queue must be created if it does
not exist, false
otherwiseapplicationId
- the application ID to assign to the queuenull
if teh queue cannot be foundpublic boolean removeLeafQueue(String name)
name
- name of the queuepublic FSParentQueue getParentQueue(String name, boolean create)
true
and the queue does not exist.
If the queue is not or can not be a parent queue, i.e. it already exists
as a leaf queue, or one of the parents in its name is already a leaf
queue, null
is returned.
The root part of the name is optional, so a queue underneath the root
named "queue1" could be referred to as just "queue1", and a queue named
"queue2" underneath a parent named "parent1" that is underneath the root
could be referred to as just "parent1.queue2".name
- name of the queuecreate
- true
if the queue must be created if it does
not exist, false
otherwisenull
if the queue cannot be foundpublic FSParentQueue getParentQueue(String name, boolean create, boolean recomputeSteadyShares)
true
and the queue does not exist.
If the queue is not or can not be a parent queue, i.e. it already exists
as a leaf queue, or one of the parents in its name is already a leaf
queue, null
is returned.
The root part of the name is optional, so a queue underneath the root
named "queue1" could be referred to as just "queue1", and a queue named
"queue2" underneath a parent named "parent1" that is underneath the root
could be referred to as just "parent1.queue2".name
- name of the queuecreate
- true
if the queue must be created if it does
not exist, false
otherwiserecomputeSteadyShares
- true
if the steady fair share
should be recalculated when a queue is added,
false
otherwisenull
if the queue cannot be foundpublic void removeEmptyDynamicQueues()
public void removePendingIncompatibleQueues()
public boolean exists(String name)
public Collection<FSLeafQueue> getLeafQueues()
public Collection<FSQueue> getQueues()
public void updateAllocationConfiguration(AllocationConfiguration queueConf)
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.