org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair
Class QueueManager

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.QueueManager

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class QueueManager
extends Object

Maintains a list of queues as well as scheduling parameters for each queue, such as guaranteed share allocations, from the fair scheduler config file.


Field Summary
static org.apache.commons.logging.Log LOG
           
static String ROOT_QUEUE
           
 
Constructor Summary
QueueManager(FairScheduler scheduler)
           
 
Method Summary
 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 is necessary.
 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 is necessary.
 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)
           
protected  boolean isEmpty(FSQueue queue)
          Returns true if there are no applications, running or not, in the given queue or any of its descendents.
 void updateAllocationConfiguration(AllocationConfiguration queueConf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

ROOT_QUEUE

public static final String ROOT_QUEUE
See Also:
Constant Field Values
Constructor Detail

QueueManager

public QueueManager(FairScheduler scheduler)
Method Detail

getRootQueue

public FSParentQueue getRootQueue()

initialize

public void initialize(org.apache.hadoop.conf.Configuration conf)
                throws IOException,
                       SAXException,
                       AllocationConfigurationException,
                       ParserConfigurationException
Throws:
IOException
SAXException
AllocationConfigurationException
ParserConfigurationException

getLeafQueue

public FSLeafQueue getLeafQueue(String name,
                                boolean create)
Get a leaf queue by name, creating it if the create param is true and is necessary. 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".


getParentQueue

public FSParentQueue getParentQueue(String name,
                                    boolean create)
Get a parent queue by name, creating it if the create param is true and is necessary. 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".


isEmpty

protected boolean isEmpty(FSQueue queue)
Returns true if there are no applications, running or not, in the given queue or any of its descendents.


getQueue

public FSQueue getQueue(String name)
Gets a queue by name.


exists

public boolean exists(String name)
Return whether a queue exists already.


getLeafQueues

public Collection<FSLeafQueue> getLeafQueues()
Get a collection of all leaf queues


getQueues

public Collection<FSQueue> getQueues()
Get a collection of all queues


updateAllocationConfiguration

public void updateAllocationConfiguration(AllocationConfiguration queueConf)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.