@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(Resource clusterResource,
FiCaSchedulerNode node)
Assign containers to applications in the queue or it's children (if any).
|
void |
completedContainer(Resource clusterResource,
FiCaSchedulerApp application,
FiCaSchedulerNode node,
RMContainer container,
ContainerStatus containerStatus,
RMContainerEventType event,
CSQueue childQueue)
A container assigned to the queue has completed.
|
void |
finishApplication(FiCaSchedulerApp application,
String queue)
An application 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.
|
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 . |
String |
getQueueName()
Get the queue name.
|
String |
getQueuePath()
Get the full name of the queue, including the heirarchy.
|
QueueState |
getState()
Get the current run-state of the queue
|
float |
getUsedCapacity()
Get the current used capacity of the queue
and it's children (if any).
|
Resource |
getUsedResources()
Get the currently utilized resources in the cluster
by the queue and children (if any).
|
boolean |
hasAccess(QueueACL acl,
UserGroupInformation user)
Check if the
user has permission to perform the operation |
void |
recoverContainer(Resource clusterResource,
FiCaSchedulerApp application,
Container container)
Recover the state of the queue
|
void |
reinitialize(CSQueue newlyParsedQueue,
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(FiCaSchedulerApp application,
String user,
String queue)
Submit a new application to the queue.
|
void |
updateClusterResource(Resource clusterResource)
Update the cluster resource for queues as we add/remove nodes
|
getMetrics, getQueueAcls, getQueueInfo, getQueueUserAclInfo
CSQueue getParent()
Queue
.void setParent(CSQueue newParentQueue)
Queue
.newParentQueue
- new parent queueString getQueueName()
getQueueName
in interface Queue
String getQueuePath()
float getCapacity()
float getAbsoluteCapacity()
float getMaximumCapacity()
float getAbsoluteMaximumCapacity()
float getAbsoluteUsedCapacity()
float getUsedCapacity()
void setUsedCapacity(float usedCapacity)
usedCapacity
- used capacity of the queuevoid setAbsoluteUsedCapacity(float absUsedCapacity)
absUsedCapacity
- absolute used capacity of the queueResource getUsedResources()
QueueState getState()
boolean hasAccess(QueueACL acl, UserGroupInformation user)
user
has permission to perform the operationvoid submitApplication(FiCaSchedulerApp application, String user, String queue) throws AccessControlException
application
- application being submitteduser
- user who submitted the applicationqueue
- queue to which the application is submittedAccessControlException
void finishApplication(FiCaSchedulerApp application, String queue)
application
- queue
- application queueCSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node)
clusterResource
- the resource of the cluster.node
- node on which resources are availablevoid completedContainer(Resource clusterResource, FiCaSchedulerApp application, FiCaSchedulerNode node, RMContainer container, ContainerStatus containerStatus, RMContainerEventType event, CSQueue childQueue)
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 containerint getNumApplications()
void reinitialize(CSQueue newlyParsedQueue, Resource clusterResource) throws IOException
newlyParsedQueue
- new queue to re-initalize fromclusterResource
- resources in the clusterIOException
void updateClusterResource(Resource clusterResource)
clusterResource
- the current cluster resourceActiveUsersManager getActiveUsersManager()
ActiveUsersManager
for the queue.ActiveUsersManager
for the queuevoid recoverContainer(Resource clusterResource, FiCaSchedulerApp application, Container container)
clusterResource
- the resource of the clusterapplication
- the application for which the container was allocatedcontainer
- the container that was recovered.Copyright © 2013 Apache Software Foundation. All rights reserved.