@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 |
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, updateSchedulerHealthInformation
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getActivitiesManager, getClock, getClusterResource, getLastNodeUpdateTime, getMaxClusterLevelAppPriority, getMaximumResourceCapability, getMinimumResourceCapability, getSchedulerHealth
getNodeIds
getAppResourceUsageReport, getClusterResource, getMaxClusterLevelAppPriority, getMaximumResourceCapability, getMinimumResourceCapability, getNodeReport, getNormalizedResource, getPendingResourceRequestsForAttempt, getPendingSchedulingRequestsForAttempt, getRMContainer, getSchedulerAppInfo, getSchedulerNode, getTransferredContainers, killAllAppsInQueue, moveAllApps, setClusterMaxPriority
protected 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.Configurable
public org.apache.hadoop.conf.Configuration getConf()
CapacitySchedulerContext
getConf
in interface org.apache.hadoop.conf.Configurable
getConf
in interface CapacitySchedulerContext
public QueueMetrics getRootQueueMetrics()
YarnScheduler
getRootQueueMetrics
in interface YarnScheduler
public CSQueue getRootQueue()
public CapacitySchedulerConfiguration getConfiguration()
MutableConfScheduler
getConfiguration
in interface CapacitySchedulerContext
getConfiguration
in interface MutableConfScheduler
public RMContainerTokenSecretManager getContainerTokenSecretManager()
getContainerTokenSecretManager
in interface CapacitySchedulerContext
public org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()
getResourceCalculator
in interface CapacitySchedulerContext
getResourceCalculator
in interface YarnScheduler
public void setResourceCalculator(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc)
public int getNumClusterNodes()
YarnScheduler
getNumClusterNodes
in interface CapacitySchedulerContext
getNumClusterNodes
in interface YarnScheduler
public RMContext getRMContext()
getRMContext
in interface CapacitySchedulerContext
public void setRMContext(RMContext rmContext)
ResourceScheduler
ResourceScheduler
.
This method should be called immediately after instantiating
a scheduler once.setRMContext
in interface ResourceScheduler
rmContext
- created by ResourceManagerpublic void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
Exception
public void serviceStart() throws Exception
serviceStart
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
Exception
public void serviceStop() throws Exception
serviceStop
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
Exception
public void reinitialize(org.apache.hadoop.conf.Configuration newConf, RMContext rmContext, boolean validation) throws IOException
IOException
public void reinitialize(org.apache.hadoop.conf.Configuration newConf, RMContext rmContext) throws IOException
ResourceScheduler
ResourceScheduler
.reinitialize
in interface ResourceScheduler
reinitialize
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
newConf
- configurationIOException
public PlacementRule getUserGroupMappingPlacementRule() throws IOException
IOException
public PlacementRule getAppNameMappingPlacementRule() throws IOException
IOException
public void updatePlacementRules() throws IOException
IOException
public CSQueue getQueue(String queueName)
MutableConfScheduler
getQueue
in interface MutableConfScheduler
queueName
- 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)
YarnScheduler
allocate
in interface YarnScheduler
updateRequests
- @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
YarnScheduler
getQueueInfo
in interface YarnScheduler
queueName
- queue nameincludeChildQueues
- include child queues?recursive
- get children queues?IOException
@Lock(value=org.apache.hadoop.yarn.server.utils.Lock.NoLock.class) public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo()
YarnScheduler
getQueueUserAclInfo
in interface YarnScheduler
protected void nodeUpdate(RMNode rmNode)
AbstractYarnScheduler
nodeUpdate
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>
protected 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 CapacitySchedulerContext
getApplicationAttempt
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 CapacitySchedulerContext
getNode
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 Recoverable
Exception
public void killReservedContainer(RMContainer container)
PreemptableResourceScheduler
killReservedContainer
in interface PreemptableResourceScheduler
container
- Reference to reserved container allocation.public void markContainerForPreemption(org.apache.hadoop.yarn.api.records.ApplicationAttemptId aid, RMContainer cont)
PreemptableResourceScheduler
markContainerForPreemption
in interface PreemptableResourceScheduler
aid
- the application from which we want to get a container backcont
- the container we want backpublic void killContainer(RMContainer container)
AbstractYarnScheduler
killContainer
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
container
- the container to killpublic void markContainerForKillable(RMContainer killableContainer)
PreemptableResourceScheduler
markContainerForKillable
in interface PreemptableResourceScheduler
public boolean checkAccess(org.apache.hadoop.security.UserGroupInformation callerUGI, org.apache.hadoop.yarn.api.records.QueueACL acl, String queueName)
YarnScheduler
QueueACL.ADMINISTER_QUEUE
permission,
this user can view/modify the applications in this queuecheckAccess
in interface YarnScheduler
true
if the user has the permission,
false
otherwisepublic List<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> getAppsInQueue(String queueName)
YarnScheduler
getAppsInQueue
in interface YarnScheduler
queueName
- the name of the queue.public boolean isSystemAppsLimitReached()
public void removeQueue(String queueName) throws SchedulerDynamicEditException
YarnScheduler
removeQueue
in interface YarnScheduler
removeQueue
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
queueName
- name of the queue to removeSchedulerDynamicEditException
public void addQueue(Queue queue) throws SchedulerDynamicEditException, IOException
YarnScheduler
addQueue
in interface YarnScheduler
addQueue
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
queue
- the queue being added.SchedulerDynamicEditException
IOException
public void setEntitlement(String inQueue, QueueEntitlement entitlement) throws org.apache.hadoop.yarn.exceptions.YarnException
YarnScheduler
setEntitlement
in interface YarnScheduler
setEntitlement
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
public String moveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId, String targetQueueName) throws org.apache.hadoop.yarn.exceptions.YarnException
YarnScheduler
moveApplication
in interface YarnScheduler
moveApplication
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
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 YarnScheduler
preValidateMoveApplication
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 YarnScheduler
getSchedulingResourceTypes
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
public org.apache.hadoop.yarn.api.records.Resource getMaximumResourceCapability(String queueName)
YarnScheduler
Resource
for the queue specified.getMaximumResourceCapability
in interface CapacitySchedulerContext
getMaximumResourceCapability
in interface YarnScheduler
getMaximumResourceCapability
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
queueName
- queue namepublic Set<String> getPlanQueues()
YarnScheduler
getPlanQueues
in interface YarnScheduler
getPlanQueues
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
YarnScheduler
checkAndGetApplicationPriority
in interface YarnScheduler
checkAndGetApplicationPriority
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
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
YarnScheduler
updateApplicationPriority
in interface YarnScheduler
updateApplicationPriority
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
public PreemptionManager getPreemptionManager()
getPreemptionManager
in interface CapacitySchedulerContext
public ResourceUsage getClusterResourceUsage()
getClusterResourceUsage
in interface CapacitySchedulerContext
public 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)
AbstractYarnScheduler
attemptAllocationOnNode
in interface ResourceScheduler
attemptAllocationOnNode
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)
ResourceAllocationCommitter
tryCommit
in interface ResourceAllocationCommitter
cluster
- Cluster Resource.r
- Proposal.updatePending
- Decrement pending if successful.public int getAsyncSchedulingPendingBacklogs()
public CapacitySchedulerQueueManager getCapacitySchedulerQueueManager()
getCapacitySchedulerQueueManager
in interface CapacitySchedulerContext
public WorkflowPriorityMappingsManager getWorkflowPriorityMappingsManager()
public boolean moveReservedContainer(RMContainer toBeMovedContainer, FiCaSchedulerNode targetNode)
toBeMovedContainer
- reserved container will be movedtargetNode
- targetNodepublic long checkAndGetApplicationLifetime(String queueName, long lifetimeRequestedByApp)
YarnScheduler
checkAndGetApplicationLifetime
in interface YarnScheduler
checkAndGetApplicationLifetime
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
queueName
- Name of the QueuelifetimeRequestedByApp
- configured application lifetimepublic long getMaximumApplicationLifetime(String queueName)
YarnScheduler
getMaximumApplicationLifetime
in interface YarnScheduler
getMaximumApplicationLifetime
in class AbstractYarnScheduler<FiCaSchedulerApp,FiCaSchedulerNode>
queueName
- to get lifetimepublic boolean isConfigurationMutable()
CapacitySchedulerContext
isConfigurationMutable
in interface CapacitySchedulerContext
isConfigurationMutable
in interface MutableConfScheduler
public MutableConfigurationProvider getMutableConfProvider()
MutableConfScheduler
getMutableConfProvider
in interface MutableConfScheduler
public void resetSchedulerMetrics()
ResourceScheduler
resetSchedulerMetrics
in interface ResourceScheduler
resetSchedulerMetrics
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–2022 Apache Software Foundation. All rights reserved.