org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo
Class FifoScheduler

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler
All Implemented Interfaces:
org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>, Recoverable, ResourceScheduler, YarnScheduler

@InterfaceAudience.LimitedPrivate(value="yarn")
@InterfaceStability.Evolving
public class FifoScheduler
extends Object
implements ResourceScheduler


Field Summary
static String MAXIMUM_ALLOCATION
           
static String MINIMUM_ALLOCATION
           
 
Constructor Summary
FifoScheduler()
           
 
Method Summary
 Allocation allocate(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask, List<org.apache.hadoop.yarn.api.records.ContainerId> release)
          The main api between the ApplicationMaster and the Scheduler.
 org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability()
          Get maximum allocatable Resource.
 org.apache.hadoop.yarn.api.records.Resource getMinimumResourceCapability()
          Get minimum allocatable Resource.
 SchedulerNodeReport getNodeReport(org.apache.hadoop.yarn.api.records.NodeId nodeId)
          Get node resource usage report.
 int getNumClusterNodes()
          Get the number of nodes available in the cluster.
 org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive)
          Get queue information
 List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo()
          Get acls for queues for current user.
 QueueMetrics getRootQueueMetrics()
          Get the root queue for the scheduler.
 SchedulerAppReport getSchedulerAppInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
          Get the Scheduler app for a given app attempt Id.
 void handle(SchedulerEvent event)
           
 void recover(Store.RMState state)
           
 void reinitialize(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.server.security.ContainerTokenSecretManager containerTokenSecretManager, RMContext rmContext)
          Re-initialize the ResourceScheduler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINIMUM_ALLOCATION

@InterfaceAudience.Private
public static final String MINIMUM_ALLOCATION
See Also:
Constant Field Values

MAXIMUM_ALLOCATION

@InterfaceAudience.Private
public static final String MAXIMUM_ALLOCATION
See Also:
Constant Field Values
Constructor Detail

FifoScheduler

public FifoScheduler()
Method Detail

getMinimumResourceCapability

public org.apache.hadoop.yarn.api.records.Resource getMinimumResourceCapability()
Description copied from interface: YarnScheduler
Get minimum allocatable Resource.

Specified by:
getMinimumResourceCapability in interface YarnScheduler
Returns:
minimum allocatable resource

getNumClusterNodes

public int getNumClusterNodes()
Description copied from interface: YarnScheduler
Get the number of nodes available in the cluster.

Specified by:
getNumClusterNodes in interface YarnScheduler
Returns:
the number of available nodes.

getMaximumResourceCapability

public org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability()
Description copied from interface: YarnScheduler
Get maximum allocatable Resource.

Specified by:
getMaximumResourceCapability in interface YarnScheduler
Returns:
maximum allocatable resource

reinitialize

public void reinitialize(org.apache.hadoop.conf.Configuration conf,
                         org.apache.hadoop.yarn.server.security.ContainerTokenSecretManager containerTokenSecretManager,
                         RMContext rmContext)
                  throws IOException
Description copied from interface: ResourceScheduler
Re-initialize the ResourceScheduler.

Specified by:
reinitialize in interface ResourceScheduler
Parameters:
conf - configuration
containerTokenSecretManager - token-secret manager
Throws:
IOException

allocate

public Allocation allocate(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
                           List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask,
                           List<org.apache.hadoop.yarn.api.records.ContainerId> release)
Description copied from interface: YarnScheduler
The main api between the ApplicationMaster and the Scheduler. The ApplicationMaster is updating his future resource requirements and may release containers he doens't need.

Specified by:
allocate in interface YarnScheduler
Returns:
the Allocation for the application

getSchedulerAppInfo

public SchedulerAppReport getSchedulerAppInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
Description copied from interface: YarnScheduler
Get the Scheduler app for a given app attempt Id.

Specified by:
getSchedulerAppInfo in interface YarnScheduler
Parameters:
applicationAttemptId - the id of the application attempt
Returns:
SchedulerApp for this given attempt.

handle

public void handle(SchedulerEvent event)
Specified by:
handle in interface org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>

getQueueInfo

public org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName,
                                                                 boolean includeChildQueues,
                                                                 boolean recursive)
Description copied from interface: YarnScheduler
Get queue information

Specified by:
getQueueInfo in interface YarnScheduler
Parameters:
queueName - queue name
includeChildQueues - include child queues?
recursive - get children queues?
Returns:
queue information

getQueueUserAclInfo

public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo()
Description copied from interface: YarnScheduler
Get acls for queues for current user.

Specified by:
getQueueUserAclInfo in interface YarnScheduler
Returns:
acls for queues for current user

recover

public void recover(Store.RMState state)
Specified by:
recover in interface Recoverable

getNodeReport

public SchedulerNodeReport getNodeReport(org.apache.hadoop.yarn.api.records.NodeId nodeId)
Description copied from interface: YarnScheduler
Get node resource usage report.

Specified by:
getNodeReport in interface YarnScheduler
Returns:
the SchedulerNodeReport for the node or null if nodeId does not point to a defined node.

getRootQueueMetrics

public QueueMetrics getRootQueueMetrics()
Description copied from interface: YarnScheduler
Get the root queue for the scheduler.

Specified by:
getRootQueueMetrics in interface YarnScheduler
Returns:
the root queue for the scheduler.


Copyright © 2012 Apache Software Foundation. All Rights Reserved.