Class AbstractCSQueue
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue
- All Implemented Interfaces:
CSQueue,Queue,SchedulerQueue<CSQueue>
- Direct Known Subclasses:
AbstractLeafQueue,AbstractParentQueue
Provides implementation of
CSQueue methods common for every queue class in Capacity
Scheduler.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ActivitiesManagerprotected org.apache.hadoop.yarn.security.YarnAuthorizationProviderprotected AbstractCSQueue.CapacityConfigTypeprotected Map<String,QueueCapacityVector> protected Map<String,QueueCapacityVector> protected final QueueAllocationSettingsprotected CapacitySchedulerQueueContextprotected final org.apache.hadoop.yarn.security.PrivilegedEntityprotected QueueNodeLabelsSettingsprotected final QueuePathprotected ReentrantReadWriteLock.ReadLockprotected ReentrantReadWriteLock.WriteLock -
Constructor Summary
ConstructorsConstructorDescriptionAbstractCSQueue(CapacitySchedulerQueueContext queueContext, String queueName, CSQueue parent, CSQueue old) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(org.apache.hadoop.yarn.api.records.Resource cluster, ResourceCommitRequest<FiCaSchedulerApp, FiCaSchedulerNode> request) Checks whether this queue could accept the container allocation request.voidSets the state of this queue to RUNNING.protected voidStops this queue if no application is currently running on the queue.assignContainers(org.apache.hadoop.yarn.api.records.Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits, SchedulingMode schedulingMode) protected booleancheckConfigTypeIsAbsoluteResource(QueuePath queuePath, String label) voiddecPendingResource(String nodeLabel, org.apache.hadoop.yarn.api.records.Resource resourceToDec) When an outstanding resource is fulfilled or canceled, calling this will decrease pending resource in a queue.voiddecReservedResource(String partition, org.apache.hadoop.yarn.api.records.Resource reservedRes) Decrement Reserved CapacityvoiddecUsedResource(String nodeLabel, org.apache.hadoop.yarn.api.records.Resource resourceToDec, SchedulerApplicationAttempt application) When partition of node updated, we will update queue's resource usage if it has container(s) running on that.floatGet capacity of the parent of the queue as a function of the cumulative capacity in the cluster.floatGet maximum-capacity of the queue as a funciton of the cumulative capacity of the cluster.floatGet the current absolute used capacity of the queue relative to the entire cluster.Get labels can be accessed of this queue labels={*}, means this queue can access any label labels={ }, means this queue cannot access any label except node without label labels={a, b, c} means this queue can access a or b or cMap<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> getACLs()floatGet the configured capacity of the queue.Get CapacityConfigType as PERCENTAGE or ABSOLUTE_RESOURCE.protected StringGet configured capacity vector parsed from the capacity config of the queue.Get configured maximum capacity vector parsed from the capacity config of the queue.longGet the default lifetime in seconds of an application which is submitted to this queue.org.apache.hadoop.yarn.api.records.PriorityGet the Default Application Priority for this queuebooleanGet the indicator of whether or not the default application lifetime was set by a config property or was calculated by the capacity scheduler.Get default label expression of this queue.org.apache.hadoop.yarn.api.records.ResourcegetEffectiveCapacity(String label) Get effective capacity of queue.org.apache.hadoop.yarn.api.records.ResourcegetEffectiveCapacityDown(String label, org.apache.hadoop.yarn.api.records.Resource factor) Get effective capacity of queue.org.apache.hadoop.yarn.api.records.ResourcegetEffectiveMaxCapacity(String label) Get effective max capacity of queue.org.apache.hadoop.yarn.api.records.ResourcegetEffectiveMaxCapacityDown(String label, org.apache.hadoop.yarn.api.records.Resource factor) Get effective max capacity of queue.booleanCheck whether intra-queue preemption is disabled for this queuebooleanDetermines whether or not the intra-queue preemption disabled switch is set at any level in this queue's hierarchy.getKillableContainers(String partition) protected org.apache.hadoop.yarn.api.records.ResourcegetMaximumAbsoluteResource(QueuePath queuePath, String label) org.apache.hadoop.yarn.api.records.ResourcelongGet the maximum lifetime in seconds of an application which is submitted to this queue.floatGet the configured maximum-capacity of the queue.intGet the max-parallel-applications property of the queueGet the queue metricsprotected org.apache.hadoop.yarn.api.records.ResourcegetMinimumAbsoluteResource(QueuePath queuePath, String label) org.apache.hadoop.yarn.api.records.ResourceGet Multi Node scheduling policy name.Returns the union of all node labels that could be accessed by this queue based on accessible node labels and configured node labels properties.intGet the parentQueue.booleanCheck whether disable_preemption property is set for this queueorg.apache.hadoop.yarn.api.records.PriorityGet priority of queueorg.apache.hadoop.yarn.security.PrivilegedEntityGet QueueCapacities of this queueprotected org.apache.hadoop.yarn.api.records.QueueInfoGet the queue's internal reference name.Get the full name of the queue, including the heirarchy.Gets the queue path object.Get QueueResourceQuotas associated with each queue.Get ResourceUsage of this queueGet the queue's legacy name.Get readLock associated with the Queue.org.apache.hadoop.yarn.api.records.QueueStategetState()Get the current run-state of the queueorg.apache.hadoop.yarn.api.records.ResourcegetTotalKillableResource(String partition) floatGet the current used capacity of nodes without label(s) of the queue and it's children (if any).org.apache.hadoop.yarn.api.records.ResourceGet the currently utilized resources which allocated at nodes without any labels in the cluster by the queue and children (if any).Get the UserWeights object that wraps a map of usernames and weightsGet writeLock associated with the Queue.booleanhasAccess(org.apache.hadoop.yarn.api.records.QueueACL acl, org.apache.hadoop.security.UserGroupInformation user) Checks whether the user has the required permission to execute the action ofQueueACL.voidincPendingResource(String nodeLabel, org.apache.hadoop.yarn.api.records.Resource resourceToInc) When new outstanding resource is asked, calling this will increase pending resource in a queue.voidincReservedResource(String partition, org.apache.hadoop.yarn.api.records.Resource reservedRes) Increment Reserved CapacityvoidincUsedResource(String nodeLabel, org.apache.hadoop.yarn.api.records.Resource resourceToInc, SchedulerApplicationAttempt application) When partition of node updated, we will update queue's resource usage if it has container(s) running on that.booleanChecks whether the queue is a dynamic queue (created dynamically in the fashion of auto queue creation v2).booleanChecks whether this queue is a dynamic queue and could be deleted.booleanChecks whether this queue is a dynamic queue and there has not been an application submission on it for a configured period of time.booleanReturns whether we should continue to look at all heart beating nodes even after the reservation limit was hit.protected voidprotected voidSet properties specific to dynamic queues.voidRecursively sets the state of this queue and the state of its parent to DRAINING.protected voidreleaseResource(org.apache.hadoop.yarn.api.records.Resource clusterResource, org.apache.hadoop.yarn.api.records.Resource resource, String nodePartition) Decrements resource usage of the queue and all related statistics and metrics that depends on it.voidsetConfiguredMaxCapacityVector(String label, QueueCapacityVector maxCapacityVector) Sets the configured maximum capacity vector to a specific value.voidsetConfiguredMinCapacityVector(String label, QueueCapacityVector minCapacityVector) Sets the configured minimum capacity vector to a specific value.voidsetDynamicQueue(boolean dynamicQueue) protected voidvoidsetMaxParallelApps(int maxParallelApps) voidsetMultiNodeSortingPolicyClassName(String policyName) voidSet the parentQueue.protected voidSets up capacity and weight values from configuration.protected voidsetupQueueConfigs(org.apache.hadoop.yarn.api.records.Resource clusterResource) Initialize queue properties that are based on configuration.protected voidprotected voidprotected voidupdateConfigurableResourceLimits(org.apache.hadoop.yarn.api.records.Resource clusterResource) Initializes configured minimum and maximum capacity from configuration, if capacity is defined in ABSOLUTE node.voidupdateQueueState(org.apache.hadoop.yarn.api.records.QueueState queueState) Update the queue state.voidvalidateSubmitApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, String userName, String queue) Validate submitApplication api so that moveApplication do a pre-check.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue
apply, assignContainers, attachContainer, collectSchedulerApplications, completedContainer, detachContainer, finishApplication, finishApplicationAttempt, getAbstractUsersManager, getChildQueues, getChildQueuesByTryLock, getNumApplications, refreshAfterResourceCalculation, reinitialize, submitApplication, submitApplicationAttempt, submitApplicationAttempt, updateClusterResourceMethods inherited from interface org.apache.hadoop.yarn.server.resourcemanager.scheduler.Queue
getQueueInfo, getQueueUserAclInfo, recoverContainerMethods inherited from interface org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerQueue
stopQueue
-
Field Details
-
queueAllocationSettings
-
queuePath
-
queueNodeLabelsSettings
-
queueEntity
protected final org.apache.hadoop.yarn.security.PrivilegedEntity queueEntity -
capacityConfigType
-
configuredCapacityVectors
-
configuredMaxCapacityVectors
-
queueContext
-
authorizer
protected org.apache.hadoop.yarn.security.YarnAuthorizationProvider authorizer -
activitiesManager
-
readLock
-
writeLock
-
-
Constructor Details
-
AbstractCSQueue
public AbstractCSQueue(CapacitySchedulerQueueContext queueContext, String queueName, CSQueue parent, CSQueue old)
-
-
Method Details
-
setupConfigurableCapacities
protected void setupConfigurableCapacities()Sets up capacity and weight values from configuration. -
getQueuePath
Description copied from interface:CSQueueGet the full name of the queue, including the heirarchy.- Specified by:
getQueuePathin interfaceCSQueue- Returns:
- the full name of the queue
-
getQueuePathObject
Description copied from interface:CSQueueGets the queue path object.- Specified by:
getQueuePathObjectin interfaceCSQueue- Returns:
- the object of the queue
-
getCapacity
public float getCapacity()Description copied from interface:CSQueueGet the configured capacity of the queue.- Specified by:
getCapacityin interfaceCSQueue- Returns:
- configured queue capacity
-
getAbsoluteCapacity
public float getAbsoluteCapacity()Description copied from interface:CSQueueGet capacity of the parent of the queue as a function of the cumulative capacity in the cluster.- Specified by:
getAbsoluteCapacityin interfaceCSQueue- Returns:
- capacity of the parent of the queue as a function of the cumulative capacity in the cluster
-
getAbsoluteMaximumCapacity
public float getAbsoluteMaximumCapacity()Description copied from interface:CSQueueGet maximum-capacity of the queue as a funciton of the cumulative capacity of the cluster.- Specified by:
getAbsoluteMaximumCapacityin interfaceCSQueue- Returns:
- maximum-capacity of the queue as a funciton of the cumulative capacity of the cluster
-
getAbsoluteUsedCapacity
public float getAbsoluteUsedCapacity()Description copied from interface:CSQueueGet the current absolute used capacity of the queue relative to the entire cluster.- Specified by:
getAbsoluteUsedCapacityin interfaceCSQueue- Returns:
- queue absolute used capacity
-
getMaximumCapacity
public float getMaximumCapacity()Description copied from interface:CSQueueGet the configured maximum-capacity of the queue.- Specified by:
getMaximumCapacityin interfaceCSQueue- Returns:
- the configured maximum-capacity of the queue
-
getUsedCapacity
public float getUsedCapacity()Description copied from interface:CSQueueGet the current used capacity of nodes without label(s) of the queue and it's children (if any).- Specified by:
getUsedCapacityin interfaceCSQueue- Returns:
- queue used capacity
-
getUsedResources
public org.apache.hadoop.yarn.api.records.Resource getUsedResources()Description copied from interface:CSQueueGet the currently utilized resources which allocated at nodes without any labels in the cluster by the queue and children (if any).- Specified by:
getUsedResourcesin interfaceCSQueue- Returns:
- used resources by the queue and it's children
-
getNumContainers
public int getNumContainers() -
getState
public org.apache.hadoop.yarn.api.records.QueueState getState()Description copied from interface:CSQueueGet the current run-state of the queue- Specified by:
getStatein interfaceCSQueue- Specified by:
getStatein interfaceSchedulerQueue<CSQueue>- Returns:
- current run-state
-
getMetrics
Description copied from interface:QueueGet the queue metrics- Specified by:
getMetricsin interfaceQueue- Returns:
- the queue metrics
-
getQueueShortName
Description copied from interface:CSQueueGet the queue's legacy name.- Specified by:
getQueueShortNamein interfaceCSQueue- Returns:
- the queue name
-
getQueueName
Description copied from interface:CSQueueGet the queue's internal reference name.- Specified by:
getQueueNamein interfaceCSQueue- Specified by:
getQueueNamein interfaceQueue- Returns:
- the queue name
-
getParent
Description copied from interface:CSQueueGet the parentQueue.- Specified by:
getParentin interfaceCSQueue- Specified by:
getParentin interfaceSchedulerQueue<CSQueue>- Returns:
- the parent queue
-
setParent
Description copied from interface:CSQueueSet the parentQueue. -
getPrivilegedEntity
public org.apache.hadoop.yarn.security.PrivilegedEntity getPrivilegedEntity()- Specified by:
getPrivilegedEntityin interfaceCSQueue
-
getQueueContext
-
getAccessibleNodeLabels
Description copied from interface:QueueGet labels can be accessed of this queue labels={*}, means this queue can access any label labels={ }, means this queue cannot access any label except node without label labels={a, b, c} means this queue can access a or b or c- Specified by:
getAccessibleNodeLabelsin interfaceQueue- Returns:
- labels
-
hasAccess
public boolean hasAccess(org.apache.hadoop.yarn.api.records.QueueACL acl, org.apache.hadoop.security.UserGroupInformation user) Checks whether the user has the required permission to execute the action ofQueueACL. -
getDefaultNodeLabelExpression
Description copied from interface:QueueGet default label expression of this queue. If label expression of ApplicationSubmissionContext and label expression of Resource Request not set, this will be used.- Specified by:
getDefaultNodeLabelExpressionin interfaceQueue- Returns:
- default label expression
-
setupQueueConfigs
protected void setupQueueConfigs(org.apache.hadoop.yarn.api.records.Resource clusterResource) throws IOException Initialize queue properties that are based on configuration.- Parameters:
clusterResource- overall resource of the cluster- Throws:
IOException- if configuration is set in a way that is inconsistent
-
parseAndSetDynamicTemplates
protected void parseAndSetDynamicTemplates()Set properties specific to dynamic queues. -
setDynamicQueueACLProperties
protected void setDynamicQueueACLProperties() -
overrideCapacityVectorsForSpecialQueues
-
getMinimumAbsoluteResource
-
getMaximumAbsoluteResource
-
checkConfigTypeIsAbsoluteResource
-
updateCapacityConfigType
protected void updateCapacityConfigType() -
updateConfigurableResourceLimits
protected void updateConfigurableResourceLimits(org.apache.hadoop.yarn.api.records.Resource clusterResource) Initializes configured minimum and maximum capacity from configuration, if capacity is defined in ABSOLUTE node.- Parameters:
clusterResource- overall resource of the cluster
-
getCapacityConfigType
Description copied from interface:CSQueueGet CapacityConfigType as PERCENTAGE or ABSOLUTE_RESOURCE.- Specified by:
getCapacityConfigTypein interfaceCSQueue- Returns:
- CapacityConfigType
-
getEffectiveCapacity
Description copied from interface:CSQueueGet effective capacity of queue. If min/max resource is configured, preference will be given to absolute configuration over normal capacity.- Specified by:
getEffectiveCapacityin interfaceCSQueue- Parameters:
label- partition- Returns:
- effective queue capacity
-
getEffectiveCapacityDown
public org.apache.hadoop.yarn.api.records.Resource getEffectiveCapacityDown(String label, org.apache.hadoop.yarn.api.records.Resource factor) Description copied from interface:CSQueueGet effective capacity of queue. If min/max resource is configured, preference will be given to absolute configuration over normal capacity. Also round down the result to normalizeDown.- Specified by:
getEffectiveCapacityDownin interfaceCSQueue- Parameters:
label- partitionfactor- factor to normalize down- Returns:
- effective queue capacity
-
getEffectiveMaxCapacity
Description copied from interface:CSQueueGet effective max capacity of queue. If min/max resource is configured, preference will be given to absolute configuration over normal capacity.- Specified by:
getEffectiveMaxCapacityin interfaceCSQueue- Parameters:
label- partition- Returns:
- effective max queue capacity
-
getEffectiveMaxCapacityDown
public org.apache.hadoop.yarn.api.records.Resource getEffectiveMaxCapacityDown(String label, org.apache.hadoop.yarn.api.records.Resource factor) Description copied from interface:CSQueueGet effective max capacity of queue. If min/max resource is configured, preference will be given to absolute configuration over normal capacity. Also round down the result to normalizeDown.- Specified by:
getEffectiveMaxCapacityDownin interfaceCSQueue- Parameters:
label- partitionfactor- factor to normalize down- Returns:
- effective max queue capacity
-
getConfiguredCapacityVector
Description copied from interface:CSQueueGet configured capacity vector parsed from the capacity config of the queue.- Specified by:
getConfiguredCapacityVectorin interfaceCSQueue- Parameters:
label- node label (partition)- Returns:
- capacity resource vector
-
getConfiguredMaxCapacityVector
Description copied from interface:CSQueueGet configured maximum capacity vector parsed from the capacity config of the queue.- Specified by:
getConfiguredMaxCapacityVectorin interfaceCSQueue- Parameters:
label- node label (partition)- Returns:
- capacity resource vector
-
setConfiguredMinCapacityVector
Description copied from interface:CSQueueSets the configured minimum capacity vector to a specific value.- Specified by:
setConfiguredMinCapacityVectorin interfaceCSQueue- Parameters:
label- node label (partition)minCapacityVector- capacity vector
-
setConfiguredMaxCapacityVector
Description copied from interface:CSQueueSets the configured maximum capacity vector to a specific value.- Specified by:
setConfiguredMaxCapacityVectorin interfaceCSQueue- Parameters:
label- node label (partition)maxCapacityVector- capacity vector
-
getQueueInfo
protected org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo() -
getMaximumAllocation
@Private public org.apache.hadoop.yarn.api.records.Resource getMaximumAllocation()- Specified by:
getMaximumAllocationin interfaceCSQueue
-
getMinimumAllocation
@Private public org.apache.hadoop.yarn.api.records.Resource getMinimumAllocation()- Specified by:
getMinimumAllocationin interfaceCSQueue
-
releaseResource
protected void releaseResource(org.apache.hadoop.yarn.api.records.Resource clusterResource, org.apache.hadoop.yarn.api.records.Resource resource, String nodePartition) Decrements resource usage of the queue and all related statistics and metrics that depends on it.- Parameters:
clusterResource- overall cluster resourceresource- resource amount to decrementnodePartition- node label
-
isReservationsContinueLooking
@Private public boolean isReservationsContinueLooking()Returns whether we should continue to look at all heart beating nodes even after the reservation limit was hit.- Returns:
- true, continue to look at all heart beating nodes even after the reservation limit was hit. otherwise false.
-
getACLs
@Private public Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> getACLs() -
getPreemptionDisabled
@Private public boolean getPreemptionDisabled()Description copied from interface:CSQueueCheck whether disable_preemption property is set for this queue- Specified by:
getPreemptionDisabledin interfaceCSQueue- Returns:
- true if disable_preemption is set, false if not
-
getIntraQueuePreemptionDisabled
@Private public boolean getIntraQueuePreemptionDisabled()Description copied from interface:CSQueueCheck whether intra-queue preemption is disabled for this queue- Specified by:
getIntraQueuePreemptionDisabledin interfaceCSQueue- Returns:
- true if either intra-queue preemption or inter-queue preemption is disabled for this queue, false if neither is disabled.
-
getIntraQueuePreemptionDisabledInHierarchy
@Private public boolean getIntraQueuePreemptionDisabledInHierarchy()Description copied from interface:CSQueueDetermines whether or not the intra-queue preemption disabled switch is set at any level in this queue's hierarchy.- Specified by:
getIntraQueuePreemptionDisabledInHierarchyin interfaceCSQueue- Returns:
- state of the intra-queue preemption switch at this queue level
-
getQueueCapacities
Description copied from interface:CSQueueGet QueueCapacities of this queue- Specified by:
getQueueCapacitiesin interfaceCSQueue- Returns:
- queueCapacities
-
getQueueResourceUsage
Description copied from interface:CSQueueGet ResourceUsage of this queue- Specified by:
getQueueResourceUsagein interfaceCSQueue- Returns:
- resourceUsage
-
getQueueResourceQuotas
Description copied from interface:CSQueueGet QueueResourceQuotas associated with each queue.- Specified by:
getQueueResourceQuotasin interfaceCSQueue- Returns:
- QueueResourceQuotas
-
getReadLock
Description copied from interface:CSQueueGet readLock associated with the Queue.- Specified by:
getReadLockin interfaceCSQueue- Returns:
- readLock of corresponding queue.
-
getWriteLock
Description copied from interface:CSQueueGet writeLock associated with the Queue.- Specified by:
getWriteLockin interfaceCSQueue- Returns:
- writeLock of corresponding queue.
-
getConfiguredNodeLabels
- Specified by:
getConfiguredNodeLabelsin interfaceCSQueue
-
incReservedResource
public void incReservedResource(String partition, org.apache.hadoop.yarn.api.records.Resource reservedRes) Description copied from interface:QueueIncrement Reserved Capacity- Specified by:
incReservedResourcein interfaceQueue- Parameters:
partition- asked by applicationreservedRes- reserved resource asked
-
decReservedResource
public void decReservedResource(String partition, org.apache.hadoop.yarn.api.records.Resource reservedRes) Description copied from interface:QueueDecrement Reserved Capacity- Specified by:
decReservedResourcein interfaceQueue- Parameters:
partition- asked by applicationreservedRes- reserved resource asked
-
incPendingResource
public void incPendingResource(String nodeLabel, org.apache.hadoop.yarn.api.records.Resource resourceToInc) Description copied from interface:QueueWhen new outstanding resource is asked, calling this will increase pending resource in a queue.- Specified by:
incPendingResourcein interfaceQueue- Parameters:
nodeLabel- asked by applicationresourceToInc- new resource asked
-
decPendingResource
public void decPendingResource(String nodeLabel, org.apache.hadoop.yarn.api.records.Resource resourceToDec) Description copied from interface:CSQueueWhen an outstanding resource is fulfilled or canceled, calling this will decrease pending resource in a queue.- Specified by:
decPendingResourcein interfaceCSQueue- Specified by:
decPendingResourcein interfaceQueue- Parameters:
nodeLabel- asked by applicationresourceToDec- new resource asked
-
incUsedResource
public void incUsedResource(String nodeLabel, org.apache.hadoop.yarn.api.records.Resource resourceToInc, SchedulerApplicationAttempt application) Description copied from interface:CSQueueWhen partition of node updated, we will update queue's resource usage if it has container(s) running on that.- Specified by:
incUsedResourcein interfaceCSQueue- Parameters:
nodeLabel- node label.resourceToInc- resource.application- application.
-
decUsedResource
public void decUsedResource(String nodeLabel, org.apache.hadoop.yarn.api.records.Resource resourceToDec, SchedulerApplicationAttempt application) Description copied from interface:CSQueueWhen partition of node updated, we will update queue's resource usage if it has container(s) running on that.- Specified by:
decUsedResourcein interfaceCSQueue- Parameters:
nodeLabel- node label.resourceToDec- resource.application- application.
-
getDefaultApplicationPriority
public org.apache.hadoop.yarn.api.records.Priority getDefaultApplicationPriority()Description copied from interface:QueueGet the Default Application Priority for this queue- Specified by:
getDefaultApplicationPriorityin interfaceQueue- Returns:
- default application priority
-
getNodeLabelsForQueue
Returns the union of all node labels that could be accessed by this queue based on accessible node labels and configured node labels properties.- Specified by:
getNodeLabelsForQueuein interfaceCSQueue- Returns:
- node labels this queue has access to
-
getTotalKillableResource
-
getKillableContainers
-
assignContainers
@VisibleForTesting public CSAssignment assignContainers(org.apache.hadoop.yarn.api.records.Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits, SchedulingMode schedulingMode) - Specified by:
assignContainersin interfaceCSQueue
-
accept
public boolean accept(org.apache.hadoop.yarn.api.records.Resource cluster, ResourceCommitRequest<FiCaSchedulerApp, FiCaSchedulerNode> request) Checks whether this queue could accept the container allocation request. -
validateSubmitApplication
public void validateSubmitApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId, String userName, String queue) throws org.apache.hadoop.security.AccessControlException Description copied from interface:CSQueueValidate submitApplication api so that moveApplication do a pre-check.- Specified by:
validateSubmitApplicationin interfaceCSQueue- Parameters:
applicationId- Application IDuserName- User Namequeue- Queue Name- Throws:
org.apache.hadoop.security.AccessControlException- if any acl violation is there.
-
updateQueueState
public void updateQueueState(org.apache.hadoop.yarn.api.records.QueueState queueState) Description copied from interface:SchedulerQueueUpdate the queue state.- Specified by:
updateQueueStatein interfaceSchedulerQueue<CSQueue>- Parameters:
queueState- the queue state
-
activateQueue
public void activateQueue() throws org.apache.hadoop.yarn.exceptions.YarnExceptionSets the state of this queue to RUNNING.- Specified by:
activateQueuein interfaceSchedulerQueue<CSQueue>- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if its parent queue is not in RUNNING state
-
appFinished
protected void appFinished()Stops this queue if no application is currently running on the queue. -
getPriority
public org.apache.hadoop.yarn.api.records.Priority getPriority()Description copied from interface:CSQueueGet priority of queue- Specified by:
getPriorityin interfaceCSQueue- Returns:
- queue priority
-
getUserWeights
Description copied from interface:CSQueueGet the UserWeights object that wraps a map of usernames and weights- Specified by:
getUserWeightsin interfaceCSQueue- Returns:
- The UserWeights object.
-
recoverDrainingState
public void recoverDrainingState()Recursively sets the state of this queue and the state of its parent to DRAINING. -
getMultiNodeSortingPolicyClassName
Description copied from interface:CSQueueGet Multi Node scheduling policy name.- Specified by:
getMultiNodeSortingPolicyClassNamein interfaceCSQueue- Returns:
- policy name
-
setMultiNodeSortingPolicyClassName
-
getMaximumApplicationLifetime
public long getMaximumApplicationLifetime()Description copied from interface:CSQueueGet the maximum lifetime in seconds of an application which is submitted to this queue. Apps can set their own lifetime timeout up to this value.- Specified by:
getMaximumApplicationLifetimein interfaceCSQueue- Returns:
- max lifetime in seconds
-
getDefaultApplicationLifetime
public long getDefaultApplicationLifetime()Description copied from interface:CSQueueGet the default lifetime in seconds of an application which is submitted to this queue. If an app doesn't specify its own timeout when submitted, this value will be used.- Specified by:
getDefaultApplicationLifetimein interfaceCSQueue- Returns:
- default app lifetime
-
getDefaultAppLifetimeWasSpecifiedInConfig
public boolean getDefaultAppLifetimeWasSpecifiedInConfig()Description copied from interface:CSQueueGet the indicator of whether or not the default application lifetime was set by a config property or was calculated by the capacity scheduler.- Specified by:
getDefaultAppLifetimeWasSpecifiedInConfigin interfaceCSQueue- Returns:
- indicator whether set or calculated
-
setMaxParallelApps
public void setMaxParallelApps(int maxParallelApps) -
getMaxParallelApps
public int getMaxParallelApps()Description copied from interface:CSQueueGet the max-parallel-applications property of the queue- Specified by:
getMaxParallelAppsin interfaceCSQueue- Returns:
- max-parallel-applications
-
updateAbsoluteCapacities
protected void updateAbsoluteCapacities() -
isDynamicQueue
public boolean isDynamicQueue()Description copied from interface:CSQueueChecks whether the queue is a dynamic queue (created dynamically in the fashion of auto queue creation v2).- Specified by:
isDynamicQueuein interfaceCSQueue- Returns:
- true, if it is a dynamic queue, false otherwise
-
setDynamicQueue
public void setDynamicQueue(boolean dynamicQueue) -
getCapacityOrWeightString
-
isEligibleForAutoDeletion
public boolean isEligibleForAutoDeletion()Checks whether this queue is a dynamic queue and could be deleted.- Returns:
- true if the dynamic queue could be deleted, false otherwise
-
isInactiveDynamicQueue
public boolean isInactiveDynamicQueue()Checks whether this queue is a dynamic queue and there has not been an application submission on it for a configured period of time.- Returns:
- true if queue has been idle for a configured period of time, false otherwise
-