public interface YarnScheduler extends org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>
| Modifier and Type | Method and Description |
|---|---|
void |
addQueue(Queue newQueue)
Add to the scheduler a new Queue.
|
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,
ContainerUpdates updateRequests)
The main api between the ApplicationMaster and the Scheduler.
|
boolean |
checkAccess(org.apache.hadoop.security.UserGroupInformation callerUGI,
org.apache.hadoop.yarn.api.records.QueueACL acl,
String queueName)
Check if the user has permission to perform the operation.
|
long |
checkAndGetApplicationLifetime(String queueName,
long lifetime)
Verify whether a submitted application lifetime is valid as per configured
Queue lifetime.
|
org.apache.hadoop.yarn.api.records.Priority |
checkAndGetApplicationPriority(org.apache.hadoop.yarn.api.records.Priority priorityRequestedByApp,
org.apache.hadoop.security.UserGroupInformation user,
String queueName,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Verify whether a submitted application priority is valid as per configured
Queue
|
org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport |
getAppResourceUsageReport(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
Get a resource usage report from a given app attempt ID.
|
List<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> |
getAppsInQueue(String queueName)
Gets the apps under a given queue
|
org.apache.hadoop.yarn.api.records.Resource |
getClusterResource()
Get the whole resource capacity of the cluster.
|
org.apache.hadoop.yarn.api.records.Priority |
getMaxClusterLevelAppPriority()
Get cluster max priority.
|
long |
getMaximumApplicationLifetime(String queueName)
Get maximum lifetime for a queue.
|
org.apache.hadoop.yarn.api.records.Resource |
getMaximumResourceCapability()
Get maximum allocatable
Resource at the cluster level. |
org.apache.hadoop.yarn.api.records.Resource |
getMaximumResourceCapability(String queueName)
Get maximum allocatable
Resource for the queue specified. |
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.
|
org.apache.hadoop.yarn.api.records.Resource |
getNormalizedResource(org.apache.hadoop.yarn.api.records.Resource requestedResource)
Normalize a resource request.
|
int |
getNumClusterNodes()
Get the number of nodes available in the cluster.
|
List<org.apache.hadoop.yarn.api.records.ResourceRequest> |
getPendingResourceRequestsForAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId) |
Set<String> |
getPlanQueues()
Gets the list of names for queues managed by the Reservation System
|
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.
|
org.apache.hadoop.yarn.util.resource.ResourceCalculator |
getResourceCalculator() |
RMContainer |
getRMContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Get the container for the given containerId.
|
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.
|
SchedulerNode |
getSchedulerNode(org.apache.hadoop.yarn.api.records.NodeId nodeId)
Get SchedulerNode corresponds to nodeId.
|
EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> |
getSchedulingResourceTypes()
Return a collection of the resource types that are considered when
scheduling
|
List<org.apache.hadoop.yarn.api.records.Container> |
getTransferredContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
Get previous attempts' live containers for work-preserving AM restart.
|
void |
killAllAppsInQueue(String queueName)
Terminate all applications in the specified queue.
|
void |
moveAllApps(String sourceQueue,
String destQueue)
Completely drain sourceQueue of applications, by moving all of them to
destQueue.
|
String |
moveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
String newQueue)
Moves the given application to the given queue
|
void |
preValidateMoveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
String newQueue) |
void |
removeQueue(String queueName)
Remove an existing queue.
|
void |
setClusterMaxPriority(org.apache.hadoop.conf.Configuration conf)
Set the cluster max priority
|
void |
setEntitlement(String queue,
QueueEntitlement entitlement)
This method increase the entitlement for current queue (must respect
invariants, e.g., no overcommit of parents, non negative, etc.).
|
org.apache.hadoop.yarn.api.records.Priority |
updateApplicationPriority(org.apache.hadoop.yarn.api.records.Priority newPriority,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
com.google.common.util.concurrent.SettableFuture<Object> future,
org.apache.hadoop.security.UserGroupInformation user)
Change application priority of a submitted application at runtime
|
@InterfaceAudience.Public @InterfaceStability.Stable org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive) throws IOException
queueName - queue nameincludeChildQueues - include child queues?recursive - get children queues?IOException@InterfaceAudience.Public @InterfaceStability.Stable List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo()
@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Unstable org.apache.hadoop.yarn.api.records.Resource getClusterResource()
@InterfaceAudience.Public @InterfaceStability.Stable org.apache.hadoop.yarn.api.records.Resource getMinimumResourceCapability()
Resource.@InterfaceAudience.Public @InterfaceStability.Stable org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability()
Resource at the cluster level.@InterfaceAudience.Public @InterfaceStability.Stable org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability(String queueName)
Resource for the queue specified.queueName - queue name@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Evolving org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()
@InterfaceAudience.Public @InterfaceStability.Stable int getNumClusterNodes()
@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, ContainerUpdates updateRequests)
appAttemptId - ask - release - blacklistAdditions - blacklistRemovals - updateRequests - Allocation for the application@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Stable SchedulerNodeReport getNodeReport(org.apache.hadoop.yarn.api.records.NodeId nodeId)
nodeId - SchedulerNodeReport for the node or null
if nodeId does not point to a defined node.@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Stable SchedulerAppReport getSchedulerAppInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
appAttemptId - the id of the application attempt@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Evolving org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport getAppResourceUsageReport(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
appAttemptId - the id of the application attempt@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Evolving QueueMetrics getRootQueueMetrics()
boolean checkAccess(org.apache.hadoop.security.UserGroupInformation callerUGI,
org.apache.hadoop.yarn.api.records.QueueACL acl,
String queueName)
QueueACL.ADMINISTER_QUEUE permission,
this user can view/modify the applications in this queuecallerUGI - acl - queueName - true if the user has the permission,
false otherwise@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Stable List<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> getAppsInQueue(String queueName)
queueName - the name of the queue.@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Unstable RMContainer getRMContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
containerId - @InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Evolving String moveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId, String newQueue) throws org.apache.hadoop.yarn.exceptions.YarnException
appId - newQueue - org.apache.hadoop.yarn.exceptions.YarnException - if the move cannot be carried out@InterfaceAudience.LimitedPrivate(value="yarn")
@InterfaceStability.Evolving
void preValidateMoveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
String newQueue)
throws org.apache.hadoop.yarn.exceptions.YarnException
appId - Application IDnewQueue - Target QueueNameorg.apache.hadoop.yarn.exceptions.YarnException - if the pre-validation for move cannot be carried outvoid moveAllApps(String sourceQueue, String destQueue) throws org.apache.hadoop.yarn.exceptions.YarnException
sourceQueue - destQueue - org.apache.hadoop.yarn.exceptions.YarnExceptionvoid killAllAppsInQueue(String queueName) throws org.apache.hadoop.yarn.exceptions.YarnException
queueName - the name of queue to be drainedorg.apache.hadoop.yarn.exceptions.YarnExceptionvoid removeQueue(String queueName) throws org.apache.hadoop.yarn.exceptions.YarnException
queueName - name of the queue to removeorg.apache.hadoop.yarn.exceptions.YarnExceptionvoid addQueue(Queue newQueue) throws org.apache.hadoop.yarn.exceptions.YarnException
newQueue - the queue being added.org.apache.hadoop.yarn.exceptions.YarnExceptionvoid setEntitlement(String queue, QueueEntitlement entitlement) throws org.apache.hadoop.yarn.exceptions.YarnException
queue - the queue for which we change entitlemententitlement - the new entitlement for the queue (capacity,
maxCapacity, etc..)org.apache.hadoop.yarn.exceptions.YarnExceptionSet<String> getPlanQueues() throws org.apache.hadoop.yarn.exceptions.YarnException
org.apache.hadoop.yarn.exceptions.YarnExceptionEnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> getSchedulingResourceTypes()
org.apache.hadoop.yarn.api.records.Priority checkAndGetApplicationPriority(org.apache.hadoop.yarn.api.records.Priority priorityRequestedByApp,
org.apache.hadoop.security.UserGroupInformation user,
String queueName,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
throws org.apache.hadoop.yarn.exceptions.YarnException
priorityRequestedByApp - Submitted Application priority.user - User who submitted the ApplicationqueueName - Name of the QueueapplicationId - Application IDorg.apache.hadoop.yarn.exceptions.YarnExceptionorg.apache.hadoop.yarn.api.records.Priority updateApplicationPriority(org.apache.hadoop.yarn.api.records.Priority newPriority,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
com.google.common.util.concurrent.SettableFuture<Object> future,
org.apache.hadoop.security.UserGroupInformation user)
throws org.apache.hadoop.yarn.exceptions.YarnException
newPriority - Submitted Application priority.applicationId - Application IDfuture - Sets any type of exception happened from StateStoreuser - who submitted the applicationorg.apache.hadoop.yarn.exceptions.YarnExceptionList<org.apache.hadoop.yarn.api.records.Container> getTransferredContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
appAttemptId - the id of the application attemptvoid setClusterMaxPriority(org.apache.hadoop.conf.Configuration conf)
throws org.apache.hadoop.yarn.exceptions.YarnException
conf - org.apache.hadoop.yarn.exceptions.YarnExceptionList<org.apache.hadoop.yarn.api.records.ResourceRequest> getPendingResourceRequestsForAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
attemptId - org.apache.hadoop.yarn.api.records.Priority getMaxClusterLevelAppPriority()
SchedulerNode getSchedulerNode(org.apache.hadoop.yarn.api.records.NodeId nodeId)
nodeId - the node id of RMNodeorg.apache.hadoop.yarn.api.records.Resource getNormalizedResource(org.apache.hadoop.yarn.api.records.Resource requestedResource)
requestedResource - the resource to be normalized@InterfaceAudience.Public @InterfaceStability.Evolving long checkAndGetApplicationLifetime(String queueName, long lifetime)
queueName - Name of the Queuelifetime - configured application lifetime@InterfaceAudience.Public @InterfaceStability.Evolving long getMaximumApplicationLifetime(String queueName)
queueName - to get lifetimeCopyright © 2022 Apache Software Foundation. All rights reserved.