@InterfaceStability.Stable @InterfaceAudience.Private public interface CSQueue extends Queue
CSQueue represents a node in the tree of
hierarchical queues in the CapacityScheduler.| Modifier and Type | Method and Description |
|---|---|
CSAssignment |
assignContainers(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerNode node,
ResourceLimits resourceLimits)
Assign containers to applications in the queue or it's children (if any).
|
void |
attachContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
RMContainer container)
Attach a container to this queue
|
void |
collectSchedulerApplications(Collection<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> apps)
Adds all applications in the queue and its subqueues to the given collection.
|
void |
completedContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
FiCaSchedulerNode node,
RMContainer container,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event,
CSQueue childQueue,
boolean sortQueues)
A container assigned to the queue has completed.
|
void |
detachContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
RMContainer container)
Detach a container from this queue
|
void |
finishApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
String user)
An application submitted to this queue has finished.
|
void |
finishApplicationAttempt(FiCaSchedulerApp application,
String queue)
An application attempt submitted to this queue has finished.
|
float |
getAbsoluteCapacity()
Get capacity of the parent of the queue as a function of the
cumulative capacity in the cluster.
|
float |
getAbsoluteMaximumCapacity()
Get maximum-capacity of the queue as a funciton of the cumulative capacity
of the cluster.
|
float |
getAbsoluteUsedCapacity()
Get the current absolute used capacity of the queue
relative to the entire cluster.
|
float |
getAbsoluteUsedCapacity(String nodeLabel)
Get absolute used capacity for the specified label.
|
ActiveUsersManager |
getActiveUsersManager()
Get the
ActiveUsersManager for the queue. |
float |
getCapacity()
Get the configured capacity of the queue.
|
List<CSQueue> |
getChildQueues()
Get child queues
|
float |
getMaximumCapacity()
Get the configured maximum-capacity of the queue.
|
int |
getNumApplications()
Get the number of applications in the queue.
|
CSQueue |
getParent()
Get the parent
Queue. |
boolean |
getPreemptionDisabled()
Check whether disable_preemption property is set for this queue
|
QueueCapacities |
getQueueCapacities()
Get QueueCapacities of this queue
|
String |
getQueueName()
Get the queue name.
|
String |
getQueuePath()
Get the full name of the queue, including the heirarchy.
|
ResourceUsage |
getQueueResourceUsage()
Get ResourceUsage of this queue
|
org.apache.hadoop.yarn.api.records.QueueState |
getState()
Get the current run-state of the queue
|
float |
getUsedCapacity()
Get the current used capacity of nodes without label(s) of the queue
and it's children (if any).
|
float |
getUsedCapacity(String nodeLabel)
Get used capacity for the specified label.
|
org.apache.hadoop.yarn.api.records.Resource |
getUsedResources()
Get the currently utilized resources which allocated at nodes without any
labels in the cluster by the queue and children (if any).
|
boolean |
hasAccess(org.apache.hadoop.yarn.api.records.QueueACL acl,
org.apache.hadoop.security.UserGroupInformation user)
Check if the
user has permission to perform the operation |
void |
reinitialize(CSQueue newlyParsedQueue,
org.apache.hadoop.yarn.api.records.Resource clusterResource)
Reinitialize the queue.
|
void |
setAbsoluteUsedCapacity(float absUsedCapacity)
Set absolute used capacity of the queue.
|
void |
setParent(CSQueue newParentQueue)
Set the parent
Queue. |
void |
setUsedCapacity(float usedCapacity)
Set used capacity of the queue.
|
void |
submitApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
String user,
String queue)
Submit a new application to the queue.
|
void |
submitApplicationAttempt(FiCaSchedulerApp application,
String userName)
Submit an application attempt to the queue.
|
void |
updateClusterResource(org.apache.hadoop.yarn.api.records.Resource clusterResource,
ResourceLimits resourceLimits)
Update the cluster resource for queues as we add/remove nodes
|
getAccessibleNodeLabels, getDefaultNodeLabelExpression, getMetrics, getQueueInfo, getQueueUserAclInfo, recoverContainerCSQueue getParent()
Queue.void setParent(CSQueue newParentQueue)
Queue.newParentQueue - new parent queueString getQueueName()
getQueueName in interface QueueString getQueuePath()
float getCapacity()
float getAbsoluteCapacity()
float getMaximumCapacity()
float getAbsoluteMaximumCapacity()
float getAbsoluteUsedCapacity()
void setUsedCapacity(float usedCapacity)
usedCapacity - used capacity of the queuevoid setAbsoluteUsedCapacity(float absUsedCapacity)
absUsedCapacity - absolute used capacity of the queuefloat getUsedCapacity()
org.apache.hadoop.yarn.api.records.Resource getUsedResources()
org.apache.hadoop.yarn.api.records.QueueState getState()
boolean hasAccess(org.apache.hadoop.yarn.api.records.QueueACL acl,
org.apache.hadoop.security.UserGroupInformation user)
user has permission to perform the operationvoid submitApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
String user,
String queue)
throws org.apache.hadoop.security.AccessControlException
applicationId - the applicationId of the application being submitteduser - user who submitted the applicationqueue - queue to which the application is submittedorg.apache.hadoop.security.AccessControlExceptionvoid submitApplicationAttempt(FiCaSchedulerApp application, String userName)
void finishApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
String user)
applicationId - user - user who submitted the applicationvoid finishApplicationAttempt(FiCaSchedulerApp application, String queue)
CSAssignment assignContainers(org.apache.hadoop.yarn.api.records.Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits)
clusterResource - the resource of the cluster.node - node on which resources are availableresourceLimits - how much overall resource of this queue can use.void completedContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
FiCaSchedulerNode node,
RMContainer container,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event,
CSQueue childQueue,
boolean sortQueues)
clusterResource - the resource of the clusterapplication - application to which the container was assignednode - node on which the container completedcontainer - completed container,
null if it was just a reservationcontainerStatus - ContainerStatus for the completed
containerchildQueue - CSQueue to reinsert in childQueuesevent - event to be sent to the containersortQueues - indicates whether it should re-sort the queuesint getNumApplications()
void reinitialize(CSQueue newlyParsedQueue, org.apache.hadoop.yarn.api.records.Resource clusterResource) throws IOException
newlyParsedQueue - new queue to re-initalize fromclusterResource - resources in the clusterIOExceptionvoid updateClusterResource(org.apache.hadoop.yarn.api.records.Resource clusterResource,
ResourceLimits resourceLimits)
clusterResource - the current cluster resourceresourceLimits - the current ResourceLimitsActiveUsersManager getActiveUsersManager()
ActiveUsersManager for the queue.getActiveUsersManager in interface QueueActiveUsersManager for the queuevoid collectSchedulerApplications(Collection<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> apps)
apps - the collection to add the applications tovoid detachContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
RMContainer container)
clusterResource - the current cluster resourceapplication - application to which the container was assignedcontainer - the container to detachvoid attachContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
RMContainer container)
clusterResource - the current cluster resourceapplication - application to which the container was assignedcontainer - the container to attachboolean getPreemptionDisabled()
QueueCapacities getQueueCapacities()
ResourceUsage getQueueResourceUsage()
float getUsedCapacity(String nodeLabel)
nodeLabel - float getAbsoluteUsedCapacity(String nodeLabel)
nodeLabel - Copyright © 2016 Apache Software Foundation. All Rights Reserved.