Interface Queue
- All Known Subinterfaces:
CSQueue,SchedulerQueue<T>
- All Known Implementing Classes:
AbstractAutoCreatedLeafQueue,AbstractCSQueue,AbstractLeafQueue,AbstractManagedParentQueue,AbstractParentQueue,AutoCreatedLeafQueue,FSLeafQueue,FSParentQueue,FSQueue,LeafQueue,ManagedParentQueue,ParentQueue,PlanQueue,ReservationQueue
@Evolving
@LimitedPrivate("yarn")
public interface Queue
-
Method Summary
Modifier and TypeMethodDescriptionvoiddecPendingResource(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 CapacityGet 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 corg.apache.hadoop.yarn.api.records.PriorityGet the Default Application Priority for this queueGet default label expression of this queue.Get the queue metricsorg.apache.hadoop.yarn.api.records.QueueInfogetQueueInfo(boolean includeChildQueues, boolean recursive) Get queue informationGet the queue nameList<org.apache.hadoop.yarn.api.records.QueueUserACLInfo>getQueueUserAclInfo(org.apache.hadoop.security.UserGroupInformation user) Get queue ACLs for givenuser.booleanhasAccess(org.apache.hadoop.yarn.api.records.QueueACL acl, org.apache.hadoop.security.UserGroupInformation user) 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 CapacityvoidrecoverContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource, SchedulerApplicationAttempt schedulerAttempt, RMContainer rmContainer) Recover the state of the queue for a given container.
-
Method Details
-
getQueueName
String getQueueName()Get the queue name- Returns:
- queue name
-
getMetrics
QueueMetrics getMetrics()Get the queue metrics- Returns:
- the queue metrics
-
getQueueInfo
org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(boolean includeChildQueues, boolean recursive) Get queue information- Parameters:
includeChildQueues- include child queues?recursive- recursively get child queue information?- Returns:
- queue information
-
getQueueUserAclInfo
List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo(org.apache.hadoop.security.UserGroupInformation user) Get queue ACLs for givenuser.- Parameters:
user- username- Returns:
- queue ACLs for user
-
hasAccess
boolean hasAccess(org.apache.hadoop.yarn.api.records.QueueACL acl, org.apache.hadoop.security.UserGroupInformation user) -
getAbstractUsersManager
AbstractUsersManager getAbstractUsersManager() -
recoverContainer
void recoverContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource, SchedulerApplicationAttempt schedulerAttempt, RMContainer rmContainer) Recover the state of the queue for a given container.- Parameters:
clusterResource- the resource of the clusterschedulerAttempt- the application for which the container was allocatedrmContainer- the container that was recovered.
-
getAccessibleNodeLabels
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 c- Returns:
- labels
-
getDefaultNodeLabelExpression
String getDefaultNodeLabelExpression()Get default label expression of this queue. If label expression of ApplicationSubmissionContext and label expression of Resource Request not set, this will be used.- Returns:
- default label expression
-
incPendingResource
void incPendingResource(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.- Parameters:
nodeLabel- asked by applicationresourceToInc- new resource asked
-
decPendingResource
void decPendingResource(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.- Parameters:
nodeLabel- asked by applicationresourceToDec- new resource asked
-
getDefaultApplicationPriority
org.apache.hadoop.yarn.api.records.Priority getDefaultApplicationPriority()Get the Default Application Priority for this queue- Returns:
- default application priority
-
incReservedResource
Increment Reserved Capacity- Parameters:
partition- asked by applicationreservedRes- reserved resource asked
-
decReservedResource
Decrement Reserved Capacity- Parameters:
partition- asked by applicationreservedRes- reserved resource asked
-