@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Evolving public class CapacityScheduler extends AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode> implements PreemptableResourceScheduler, CapacitySchedulerContext, org.apache.hadoop.conf.Configurable, ResourceAllocationCommitter, MutableConfScheduler
| Modifier and Type | Field and Description |
|---|---|
protected List<org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.AsyncScheduleThread> |
asyncSchedulerThreads |
protected long |
THREAD_JOIN_TIMEOUT_MS |
activitiesManager, applications, EMPTY_ALLOCATION, lastNodeUpdateTime, minimumAllocation, nmExpireInterval, nmHeartbeatInterval, nodeTracker, readLock, rmContext, schedulerHealth, schedulingMonitorManager, updateInterval, writeLock| Constructor and Description |
|---|
CapacityScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNodes(List<FiCaSchedulerNode> nodesToAdd)
Add node to nodeTracker.
|
void |
addQueue(Queue queue)
Add to the scheduler a new Queue.
|
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.SchedulingRequest> schedulingRequests,
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 |
attemptAllocationOnNode(SchedulerApplicationAttempt appAttempt,
org.apache.hadoop.yarn.api.records.SchedulingRequest schedulingRequest,
SchedulerNode schedulerNode)
Default implementation.
|
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 lifetimeRequestedByApp)
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 queuePath,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Verify whether a submitted application priority is valid as per configured
Queue
|
protected void |
completedContainerInternal(RMContainer rmContainer,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event) |
ResourceCommitRequest<FiCaSchedulerApp,FiCaSchedulerNode> |
createResourceCommitRequest(CSAssignment csAssignment) |
List<FiCaSchedulerNode> |
getAllNodes() |
FiCaSchedulerApp |
getApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId) |
PlacementRule |
getAppNameMappingPlacementRule() |
List<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> |
getAppsInQueue(String queueName)
Gets the apps under a given queue
|
int |
getAsyncSchedulingPendingBacklogs() |
CapacitySchedulerQueueManager |
getCapacitySchedulerQueueManager() |
ResourceUsage |
getClusterResourceUsage() |
org.apache.hadoop.conf.Configuration |
getConf()
Get the yarn configuration.
|
CapacitySchedulerConfiguration |
getConfiguration()
Get the scheduler configuration.
|
RMContainerTokenSecretManager |
getContainerTokenSecretManager() |
long |
getMaximumApplicationLifetime(String queueName)
Get maximum lifetime for a queue.
|
org.apache.hadoop.yarn.api.records.Resource |
getMaximumResourceCapability(String queueName)
Get maximum allocatable
Resource for the queue specified. |
MutableConfigurationProvider |
getMutableConfProvider()
Get scheduler's configuration provider, so other classes can directly
call mutation APIs on configuration provider.
|
FiCaSchedulerNode |
getNode(org.apache.hadoop.yarn.api.records.NodeId nodeId) |
int |
getNumAsyncSchedulerThreads() |
int |
getNumClusterNodes()
Get the number of nodes available in the cluster.
|
Set<String> |
getPlanQueues()
Gets the list of names for queues managed by the Reservation System.
|
PreemptionManager |
getPreemptionManager() |
CSQueue |
getQueue(String queueName)
Get queue object based on queue name.
|
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() |
RMContext |
getRMContext() |
CSQueue |
getRootQueue() |
QueueMetrics |
getRootQueueMetrics()
Get the root queue for the scheduler.
|
EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> |
getSchedulingResourceTypes()
Return a collection of the resource types that are considered when
scheduling
|
PlacementRule |
getUserGroupMappingPlacementRule() |
WorkflowPriorityMappingsManager |
getWorkflowPriorityMappingsManager() |
void |
handle(SchedulerEvent event) |
boolean |
isAmbiguous(String queueName)
Determines if a short queue name reference is ambiguous, if there are at
least two queues with the same name, it is considered ambiguous.
|
boolean |
isConfigurationMutable()
Returns if configuration is mutable.
|
boolean |
isMultiNodePlacementEnabled() |
boolean |
isSystemAppsLimitReached() |
void |
killContainer(RMContainer container)
Kill a RMContainer.
|
void |
killReservedContainer(RMContainer container)
If the scheduler support container reservations, this method is used to
ask the scheduler to drop the reservation for the given container.
|
void |
markContainerForKillable(RMContainer killableContainer)
Ask the scheduler to forcibly interrupt the container given as input.
|
void |
markContainerForPreemption(org.apache.hadoop.yarn.api.records.ApplicationAttemptId aid,
RMContainer cont)
Ask the scheduler to obtain back the container from a specific application
by issuing a preemption request
|
String |
moveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
String targetQueueName)
Moves the given application to the given queue.
|
boolean |
moveReservedContainer(RMContainer toBeMovedContainer,
FiCaSchedulerNode targetNode)
Try to move a reserved container to a targetNode.
|
protected void |
nodeUpdate(RMNode rmNode)
Process a heartbeat update from a node.
|
String |
normalizeQueueName(String name)
Returns the normalized queue name, which should be used for internal
queue references.
|
boolean |
placementConstraintEnabled()
Returning true as capacity scheduler supports placement constraints.
|
void |
preValidateMoveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
String newQueue) |
void |
recover(RMStateStore.RMState state) |
void |
reinitialize(org.apache.hadoop.conf.Configuration newConf,
RMContext rmContext)
Re-initialize the
ResourceScheduler. |
void |
reinitialize(org.apache.hadoop.conf.Configuration newConf,
RMContext rmContext,
boolean validation) |
void |
removeQueue(String queueName)
Remove an existing queue.
|
void |
resetSchedulerMetrics()
Reset scheduler metrics.
|
void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
void |
serviceStart() |
void |
serviceStop() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
setEntitlement(String inQueue,
QueueEntitlement entitlement)
This method increase the entitlement for current queue (must respect
invariants, e.g., no overcommit of parents, non negative, etc.).
|
void |
setMaxRunningAppsEnforcer(CSMaxRunningAppsEnforcer enforcer) |
void |
setQueueManager(CapacitySchedulerQueueManager qm) |
void |
setResourceCalculator(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc) |
void |
setRMContext(RMContext rmContext)
Set RMContext for
ResourceScheduler. |
void |
submitResourceCommitRequest(org.apache.hadoop.yarn.api.records.Resource cluster,
CSAssignment csAssignment) |
boolean |
tryCommit(org.apache.hadoop.yarn.api.records.Resource cluster,
ResourceCommitRequest r,
boolean updatePending)
Try to commit the allocation Proposal.
|
org.apache.hadoop.yarn.api.records.Priority |
updateApplicationPriority(org.apache.hadoop.yarn.api.records.Priority newPriority,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
org.apache.hadoop.thirdparty.com.google.common.util.concurrent.SettableFuture<Object> future,
org.apache.hadoop.security.UserGroupInformation user)
Change application priority of a submitted application at runtime
|
void |
updatePlacementRules() |
asyncContainerRelease, clearPendingContainerCache, completedContainer, containerIncreasedOnNode, containerLaunchedOnNode, createReleaseCache, createSchedContainerChangeRequests, getActivitiesManager, getAppResourceUsageReport, getBlacklistedNodes, getClock, getClusterResource, getCurrentAttemptForContainer, getLastNodeUpdateTime, getMaxClusterLevelAppPriority, getMaximumAllocation, getMaximumResourceCapability, getMinimumAllocation, getMinimumResourceCapability, getNodeIds, getNodeReport, getNodes, getNodeTracker, getNormalizedResource, getPendingResourceRequestsForAttempt, getPendingSchedulingRequestsForAttempt, getRMContainer, getSchedulerAppInfo, getSchedulerApplications, getSchedulerHealth, getSchedulerNode, getSchedulingMonitorManager, getTransferredContainers, handleContainerUpdates, initMaximumResourceCapability, killAllAppsInQueue, moveAllApps, normalizeResourceRequests, normalizeResourceRequests, recoverContainersOnNode, refreshMaximumAllocation, releaseContainers, rollbackContainerUpdate, setClock, setClusterMaxPriority, setLastNodeUpdateTime, shouldContainersBeAutoUpdated, triggerUpdate, update, updateNodeResource, updateNodeResourceUtilization, updateSchedulerHealthInformationclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetActivitiesManager, getClock, getClusterResource, getLastNodeUpdateTime, getMaxClusterLevelAppPriority, getMaximumResourceCapability, getMinimumResourceCapability, getSchedulerHealthgetNodeIdsgetAppResourceUsageReport, getClusterResource, getMaxClusterLevelAppPriority, getMaximumResourceCapability, getMinimumResourceCapability, getNodeReport, getNormalizedResource, getPendingResourceRequestsForAttempt, getPendingSchedulingRequestsForAttempt, getRMContainer, getSchedulerAppInfo, getSchedulerNode, getTransferredContainers, killAllAppsInQueue, moveAllApps, setClusterMaxPriorityprotected final long THREAD_JOIN_TIMEOUT_MS
protected List<org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.AsyncScheduleThread> asyncSchedulerThreads
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic org.apache.hadoop.conf.Configuration getConf()
CapacitySchedulerContextgetConf in interface org.apache.hadoop.conf.ConfigurablegetConf in interface CapacitySchedulerContextpublic QueueMetrics getRootQueueMetrics()
YarnSchedulergetRootQueueMetrics in interface YarnSchedulerpublic CSQueue getRootQueue()
public CapacitySchedulerConfiguration getConfiguration()
MutableConfSchedulergetConfiguration in interface CapacitySchedulerContextgetConfiguration in interface MutableConfSchedulerpublic RMContainerTokenSecretManager getContainerTokenSecretManager()
getContainerTokenSecretManager in interface CapacitySchedulerContextpublic org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()
getResourceCalculator in interface CapacitySchedulerContextgetResourceCalculator in interface YarnSchedulerpublic void setResourceCalculator(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc)
public int getNumClusterNodes()
YarnSchedulergetNumClusterNodes in interface CapacitySchedulerContextgetNumClusterNodes in interface YarnSchedulerpublic RMContext getRMContext()
getRMContext in interface CapacitySchedulerContextpublic void setRMContext(RMContext rmContext)
ResourceSchedulerResourceScheduler.
This method should be called immediately after instantiating
a scheduler once.setRMContext in interface ResourceSchedulerrmContext - created by ResourceManagerpublic void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>Exceptionpublic void serviceStart()
throws Exception
serviceStart in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>Exceptionpublic void serviceStop()
throws Exception
serviceStop in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>Exceptionpublic void reinitialize(org.apache.hadoop.conf.Configuration newConf,
RMContext rmContext,
boolean validation)
throws IOException
IOExceptionpublic void reinitialize(org.apache.hadoop.conf.Configuration newConf,
RMContext rmContext)
throws IOException
ResourceSchedulerResourceScheduler.reinitialize in interface ResourceSchedulerreinitialize in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>newConf - configurationrmContext - RMContext.IOException - an I/O exception has occurred.public PlacementRule getUserGroupMappingPlacementRule() throws IOException
IOExceptionpublic PlacementRule getAppNameMappingPlacementRule() throws IOException
IOExceptionpublic void updatePlacementRules()
throws IOException
IOExceptionpublic CSQueue getQueue(String queueName)
MutableConfSchedulergetQueue in interface MutableConfSchedulerqueueName - the queue namepublic String normalizeQueueName(String name)
name - Name of the queue to be normalizedpublic boolean isAmbiguous(String queueName)
queueName - The name of the queue to check for ambiguity@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) 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.SchedulingRequest> schedulingRequests, List<org.apache.hadoop.yarn.api.records.ContainerId> release, List<String> blacklistAdditions, List<String> blacklistRemovals, ContainerUpdates updateRequests)
YarnSchedulerallocate in interface YarnSchedulerupdateRequests - @return the Allocation for the application@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName, boolean includeChildQueues, boolean recursive) throws IOException
YarnSchedulergetQueueInfo in interface YarnSchedulerqueueName - queue nameincludeChildQueues - include child queues?recursive - get children queues?IOException - an I/O exception has occurred.@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo()
YarnSchedulergetQueueUserAclInfo in interface YarnSchedulerprotected void nodeUpdate(RMNode rmNode)
AbstractYarnSchedulernodeUpdate in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>rmNode - The RMNode corresponding to the NodeManagerpublic void handle(SchedulerEvent event)
handle in interface org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>public void addNodes(List<FiCaSchedulerNode> nodesToAdd)
nodesToAdd - node to be addedprotected void completedContainerInternal(RMContainer rmContainer, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus, RMContainerEventType event)
completedContainerInternal in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public FiCaSchedulerApp getApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
getApplicationAttempt in interface CapacitySchedulerContextgetApplicationAttempt in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public FiCaSchedulerNode getNode(org.apache.hadoop.yarn.api.records.NodeId nodeId)
getNode in interface CapacitySchedulerContextgetNode in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public List<FiCaSchedulerNode> getAllNodes()
@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public void recover(RMStateStore.RMState state) throws Exception
recover in interface RecoverableExceptionpublic void killReservedContainer(RMContainer container)
PreemptableResourceSchedulerkillReservedContainer in interface PreemptableResourceSchedulercontainer - Reference to reserved container allocation.public void markContainerForPreemption(org.apache.hadoop.yarn.api.records.ApplicationAttemptId aid,
RMContainer cont)
PreemptableResourceSchedulermarkContainerForPreemption in interface PreemptableResourceScheduleraid - the application from which we want to get a container backcont - the container we want backpublic void killContainer(RMContainer container)
AbstractYarnSchedulerkillContainer in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>container - the container to killpublic void markContainerForKillable(RMContainer killableContainer)
PreemptableResourceSchedulermarkContainerForKillable in interface PreemptableResourceSchedulerkillableContainer - RMContainer.public boolean checkAccess(org.apache.hadoop.security.UserGroupInformation callerUGI,
org.apache.hadoop.yarn.api.records.QueueACL acl,
String queueName)
YarnSchedulerQueueACL.ADMINISTER_QUEUE permission,
this user can view/modify the applications in this queue.checkAccess in interface YarnSchedulercallerUGI - caller UserGroupInformation.acl - queue ACL.queueName - queue Name.true if the user has the permission,
false otherwisepublic List<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> getAppsInQueue(String queueName)
YarnSchedulergetAppsInQueue in interface YarnSchedulerqueueName - the name of the queue.public boolean isSystemAppsLimitReached()
public void removeQueue(String queueName) throws SchedulerDynamicEditException
YarnSchedulerremoveQueue in interface YarnSchedulerremoveQueue in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>queueName - name of the queue to removeSchedulerDynamicEditExceptionpublic void addQueue(Queue queue) throws SchedulerDynamicEditException, IOException
YarnScheduleraddQueue in interface YarnScheduleraddQueue in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>queue - the queue being added.IOException - when io exception occur.SchedulerDynamicEditExceptionpublic void setEntitlement(String inQueue, QueueEntitlement entitlement) throws org.apache.hadoop.yarn.exceptions.YarnException
YarnSchedulersetEntitlement in interface YarnSchedulersetEntitlement in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>inQueue - the queue for which we change entitlemententitlement - the new entitlement for the queue (capacity,
maxCapacity, etc..)org.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.public String moveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId, String targetQueueName) throws org.apache.hadoop.yarn.exceptions.YarnException
YarnSchedulermoveApplication in interface YarnSchedulermoveApplication in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>appId - application IdtargetQueueName - the given queue.org.apache.hadoop.yarn.exceptions.YarnException - if the move cannot be carried outpublic void preValidateMoveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
String newQueue)
throws org.apache.hadoop.yarn.exceptions.YarnException
preValidateMoveApplication in interface YarnSchedulerpreValidateMoveApplication in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>appId - Application IDnewQueue - Target QueueNameorg.apache.hadoop.yarn.exceptions.YarnException - if the pre-validation for move cannot be carried outpublic EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> getSchedulingResourceTypes()
getSchedulingResourceTypes in interface YarnSchedulergetSchedulingResourceTypes in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>public org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability(String queueName)
YarnSchedulerResource for the queue specified.getMaximumResourceCapability in interface CapacitySchedulerContextgetMaximumResourceCapability in interface YarnSchedulergetMaximumResourceCapability in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>queueName - queue namepublic Set<String> getPlanQueues()
YarnSchedulergetPlanQueues in interface YarnSchedulergetPlanQueues in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>public org.apache.hadoop.yarn.api.records.Priority checkAndGetApplicationPriority(org.apache.hadoop.yarn.api.records.Priority priorityRequestedByApp,
org.apache.hadoop.security.UserGroupInformation user,
String queuePath,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
throws org.apache.hadoop.yarn.exceptions.YarnException
YarnSchedulercheckAndGetApplicationPriority in interface YarnSchedulercheckAndGetApplicationPriority in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>priorityRequestedByApp - Submitted Application priority.user - User who submitted the ApplicationqueuePath - Name of the QueueapplicationId - Application IDorg.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.public org.apache.hadoop.yarn.api.records.Priority updateApplicationPriority(org.apache.hadoop.yarn.api.records.Priority newPriority,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
org.apache.hadoop.thirdparty.com.google.common.util.concurrent.SettableFuture<Object> future,
org.apache.hadoop.security.UserGroupInformation user)
throws org.apache.hadoop.yarn.exceptions.YarnException
YarnSchedulerupdateApplicationPriority in interface YarnSchedulerupdateApplicationPriority in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>newPriority - Submitted Application priority.applicationId - Application IDfuture - Sets any type of exception happened from StateStoreuser - who submitted the applicationorg.apache.hadoop.yarn.exceptions.YarnException - when yarn exception occur.public PreemptionManager getPreemptionManager()
getPreemptionManager in interface CapacitySchedulerContextpublic ResourceUsage getClusterResourceUsage()
getClusterResourceUsage in interface CapacitySchedulerContextpublic void submitResourceCommitRequest(org.apache.hadoop.yarn.api.records.Resource cluster,
CSAssignment csAssignment)
public boolean attemptAllocationOnNode(SchedulerApplicationAttempt appAttempt, org.apache.hadoop.yarn.api.records.SchedulingRequest schedulingRequest, SchedulerNode schedulerNode)
AbstractYarnSchedulerattemptAllocationOnNode in interface ResourceSchedulerattemptAllocationOnNode in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>appAttempt - ApplicationAttempt.schedulingRequest - SchedulingRequest.schedulerNode - SchedulerNode.public ResourceCommitRequest<FiCaSchedulerApp,FiCaSchedulerNode> createResourceCommitRequest(CSAssignment csAssignment)
public boolean tryCommit(org.apache.hadoop.yarn.api.records.Resource cluster,
ResourceCommitRequest r,
boolean updatePending)
ResourceAllocationCommittertryCommit in interface ResourceAllocationCommittercluster - Cluster Resource.r - Proposal.updatePending - Decrement pending if successful.public int getAsyncSchedulingPendingBacklogs()
public CapacitySchedulerQueueManager getCapacitySchedulerQueueManager()
getCapacitySchedulerQueueManager in interface CapacitySchedulerContextpublic WorkflowPriorityMappingsManager getWorkflowPriorityMappingsManager()
public boolean moveReservedContainer(RMContainer toBeMovedContainer, FiCaSchedulerNode targetNode)
toBeMovedContainer - reserved container will be movedtargetNode - targetNodepublic long checkAndGetApplicationLifetime(String queueName, long lifetimeRequestedByApp)
YarnSchedulercheckAndGetApplicationLifetime in interface YarnSchedulercheckAndGetApplicationLifetime in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>queueName - Name of the QueuelifetimeRequestedByApp - configured application lifetimepublic long getMaximumApplicationLifetime(String queueName)
YarnSchedulergetMaximumApplicationLifetime in interface YarnSchedulergetMaximumApplicationLifetime in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>queueName - to get lifetimepublic boolean isConfigurationMutable()
CapacitySchedulerContextisConfigurationMutable in interface CapacitySchedulerContextisConfigurationMutable in interface MutableConfSchedulerpublic MutableConfigurationProvider getMutableConfProvider()
MutableConfSchedulergetMutableConfProvider in interface MutableConfSchedulerpublic void resetSchedulerMetrics()
ResourceSchedulerresetSchedulerMetrics in interface ResourceSchedulerresetSchedulerMetrics in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>public boolean isMultiNodePlacementEnabled()
public int getNumAsyncSchedulerThreads()
public void setMaxRunningAppsEnforcer(CSMaxRunningAppsEnforcer enforcer)
public boolean placementConstraintEnabled()
placementConstraintEnabled in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>public void setQueueManager(CapacitySchedulerQueueManager qm)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.