@InterfaceAudience.Private @InterfaceStability.Unstable public class QueueManager extends Object
Modifier and Type | Field and Description |
---|---|
static long |
ALLOC_RELOAD_INTERVAL
Time to wait between checks of the allocation file
|
static long |
ALLOC_RELOAD_WAIT
Time to wait after the allocation has been modified before reloading it
(this is done to prevent loading a file that hasn't been fully written).
|
static org.apache.commons.logging.Log |
LOG |
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.
|
long |
getFairSharePreemptionTimeout()
Get the fair share preemption, in milliseconds.
|
FSLeafQueue |
getLeafQueue(String name,
boolean create)
Get a queue by name, creating it if the create param is true and is necessary.
|
Collection<FSLeafQueue> |
getLeafQueues()
Get a collection of all leaf queues
|
Resource |
getMaxResources(String queueName)
Get the maximum resource allocation for the given queue.
|
Resource |
getMinResources(String queue)
Get the minimum resource allocation for the given queue.
|
long |
getMinSharePreemptionTimeout(String queueName)
Get a queue's min share preemption timeout, in milliseconds.
|
FSQueue |
getQueue(String name)
Gets a queue by name.
|
Map<QueueACL,AccessControlList> |
getQueueAcls(String queue)
Get the ACLs associated with this queue.
|
int |
getQueueMaxApps(String queue) |
Collection<FSQueue> |
getQueues()
Get a collection of all queues
|
ResourceWeights |
getQueueWeight(String queue) |
FSParentQueue |
getRootQueue() |
int |
getUserMaxApps(String user) |
void |
initialize() |
void |
reloadAllocs()
Updates the allocation list from the allocation config file.
|
void |
reloadAllocsIfNecessary()
Reload allocations file if it hasn't been loaded in a while
|
public static final org.apache.commons.logging.Log LOG
public static final String ROOT_QUEUE
public static final long ALLOC_RELOAD_INTERVAL
public static final long ALLOC_RELOAD_WAIT
public QueueManager(FairScheduler scheduler)
public FSParentQueue getRootQueue()
public void initialize() throws IOException, SAXException, AllocationConfigurationException, ParserConfigurationException
public FSLeafQueue getLeafQueue(String name, boolean create)
public boolean exists(String name)
public void reloadAllocsIfNecessary()
public void reloadAllocs() throws IOException, ParserConfigurationException, SAXException, AllocationConfigurationException
IOException
- if the config file cannot be read.AllocationConfigurationException
- if allocations are invalid.ParserConfigurationException
- if XML parser is misconfigured.SAXException
- if config file is malformed.public Resource getMinResources(String queue)
public Resource getMaxResources(String queueName)
public Collection<FSLeafQueue> getLeafQueues()
public Collection<FSQueue> getQueues()
public int getUserMaxApps(String user)
public int getQueueMaxApps(String queue)
public ResourceWeights getQueueWeight(String queue)
public long getMinSharePreemptionTimeout(String queueName)
public long getFairSharePreemptionTimeout()
public Map<QueueACL,AccessControlList> getQueueAcls(String queue)
Copyright © 2013 Apache Software Foundation. All rights reserved.