org.apache.hadoop.yarn.server.resourcemanager.scheduler
Interface YarnScheduler

All Superinterfaces:
org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>
All Known Subinterfaces:
PreemptableResourceScheduler, ResourceScheduler
All Known Implementing Classes:
CapacityScheduler, FairScheduler, FifoScheduler

public interface YarnScheduler
extends org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>

This interface is used by the components to talk to the scheduler for allocating of resources, cleaning up resources.


Method Summary
 Allocation allocate(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask, List<org.apache.hadoop.yarn.api.records.ContainerId> release, List<String> blacklistAdditions, List<String> blacklistRemovals)
          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 appAttemptId)
          Get the Scheduler app for a given app attempt Id.
 
Methods inherited from interface org.apache.hadoop.yarn.event.EventHandler
handle
 

Method Detail

getQueueInfo

@InterfaceAudience.Public
@InterfaceStability.Stable
org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName,
                                                                                                             boolean includeChildQueues,
                                                                                                             boolean recursive)
                                                          throws IOException
Get queue information

Parameters:
queueName - queue name
includeChildQueues - include child queues?
recursive - get children queues?
Returns:
queue information
Throws:
IOException

getQueueUserAclInfo

@InterfaceAudience.Public
@InterfaceStability.Stable
List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo()
Get acls for queues for current user.

Returns:
acls for queues for current user

getMinimumResourceCapability

@InterfaceAudience.Public
@InterfaceStability.Stable
org.apache.hadoop.yarn.api.records.Resource getMinimumResourceCapability()
Get minimum allocatable Resource.

Returns:
minimum allocatable resource

getMaximumResourceCapability

@InterfaceAudience.Public
@InterfaceStability.Stable
org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability()
Get maximum allocatable Resource.

Returns:
maximum allocatable resource

getNumClusterNodes

@InterfaceAudience.Public
@InterfaceStability.Stable
int getNumClusterNodes()
Get the number of nodes available in the cluster.

Returns:
the number of available nodes.

allocate

@InterfaceAudience.Public
@InterfaceStability.Stable
Allocation allocate(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                                                                       List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask,
                                                                       List<org.apache.hadoop.yarn.api.records.ContainerId> release,
                                                                       List<String> blacklistAdditions,
                                                                       List<String> blacklistRemovals)
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.

Parameters:
appAttemptId -
ask -
release -
blacklistAdditions -
blacklistRemovals -
Returns:
the Allocation for the application

getNodeReport

@InterfaceAudience.LimitedPrivate(value="yarn")
@InterfaceStability.Stable
SchedulerNodeReport getNodeReport(org.apache.hadoop.yarn.api.records.NodeId nodeId)
Get node resource usage report.

Parameters:
nodeId -
Returns:
the SchedulerNodeReport for the node or null if nodeId does not point to a defined node.

getSchedulerAppInfo

@InterfaceAudience.LimitedPrivate(value="yarn")
@InterfaceStability.Stable
SchedulerAppReport getSchedulerAppInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
Get the Scheduler app for a given app attempt Id.

Parameters:
appAttemptId - the id of the application attempt
Returns:
SchedulerApp for this given attempt.

getRootQueueMetrics

@InterfaceAudience.LimitedPrivate(value="yarn")
@InterfaceStability.Evolving
QueueMetrics getRootQueueMetrics()
Get the root queue for the scheduler.

Returns:
the root queue for the scheduler.


Copyright © 2013 Apache Software Foundation. All Rights Reserved.