@InterfaceAudience.Private @InterfaceStability.Evolving public class ParentQueue extends AbstractCSQueue
| Modifier and Type | Field and Description |
|---|---|
protected Set<CSQueue> |
childQueues |
authorizer, csContext, queueEntity| Constructor and Description |
|---|
ParentQueue(CapacitySchedulerContext cs,
String queueName,
CSQueue parent,
CSQueue old) |
| Modifier and Type | Method and Description |
|---|---|
CSAssignment |
assignContainers(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerNode node,
ResourceLimits resourceLimits,
SchedulingMode schedulingMode)
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 rmContainer)
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 rmContainer,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event,
CSQueue completedChildQueue,
boolean sortQueues)
A container assigned to the queue has completed.
|
void |
decreaseContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
SchedContainerChangeRequest decreaseRequest,
FiCaSchedulerApp app)
Decrease container resource in the queue
|
void |
detachContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
RMContainer rmContainer)
Detach a container from this queue
|
void |
finishApplication(org.apache.hadoop.yarn.api.records.ApplicationId application,
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.
|
ActiveUsersManager |
getActiveUsersManager()
Get the
ActiveUsersManager for the queue. |
List<CSQueue> |
getChildQueues()
Get child queues
|
int |
getNumApplications()
Get the number of applications in the queue.
|
int |
getOffSwitchPerHeartbeatLimit() |
org.apache.hadoop.yarn.api.records.QueueInfo |
getQueueInfo(boolean includeChildQueues,
boolean recursive)
Get queue information
|
List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> |
getQueueUserAclInfo(org.apache.hadoop.security.UserGroupInformation user)
Get queue ACLs for given
user. |
boolean |
hasChildQueues() |
void |
recoverContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
SchedulerApplicationAttempt attempt,
RMContainer rmContainer)
Recover the state of the queue for a given container.
|
void |
reinitialize(CSQueue newlyParsedQueue,
org.apache.hadoop.yarn.api.records.Resource clusterResource)
Reinitialize 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.
|
String |
toString() |
void |
unreserveIncreasedContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp app,
FiCaSchedulerNode node,
RMContainer rmContainer)
We have a reserved increased container in the queue, we need to unreserve
it.
|
void |
updateClusterResource(org.apache.hadoop.yarn.api.records.Resource clusterResource,
ResourceLimits resourceLimits)
Update the cluster resource for queues as we add/remove nodes
|
accessibleToPartition, decPendingResource, decReservedResource, decUsedResource, getAbsoluteCapacity, getAbsoluteMaximumCapacity, getAbsoluteUsedCapacity, getAccessibleNodeLabels, getACLs, getCapacity, getDefaultApplicationPriority, getDefaultNodeLabelExpression, getKillableContainers, getMaximumAllocation, getMaximumCapacity, getMetrics, getMinimumAllocation, getNodeLabelsForQueue, getNumContainers, getParent, getPreemptionDisabled, getPrivilegedEntity, getQueueCapacities, getQueueInfo, getQueueName, getQueuePath, getQueueResourceUsage, getQueueStatistics, getReservationContinueLooking, getState, getTotalKillableResource, getUsedCapacity, getUsedResources, getUserWeights, hasAccess, incPendingResource, incReservedResource, incUsedResource, releaseResource, setAbsoluteUsedCapacity, setParent, setupConfigurableCapacities, setUsedCapacitypublic ParentQueue(CapacitySchedulerContext cs, String queueName, CSQueue parent, CSQueue old) throws IOException
IOExceptionpublic org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(boolean includeChildQueues,
boolean recursive)
QueueincludeChildQueues - include child queues?recursive - recursively get child queue information?@InterfaceAudience.Private public int getOffSwitchPerHeartbeatLimit()
public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo(org.apache.hadoop.security.UserGroupInformation user)
Queueuser.user - usernamepublic void reinitialize(CSQueue newlyParsedQueue, org.apache.hadoop.yarn.api.records.Resource clusterResource) throws IOException
CSQueuenewlyParsedQueue - new queue to re-initalize fromclusterResource - resources in the clusterIOExceptionpublic void submitApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
String user,
String queue)
throws org.apache.hadoop.security.AccessControlException
CSQueueapplicationId - the applicationId of the application being submitteduser - user who submitted the applicationqueue - queue to which the application is submittedorg.apache.hadoop.security.AccessControlExceptionpublic void submitApplicationAttempt(FiCaSchedulerApp application, String userName)
CSQueuepublic void finishApplicationAttempt(FiCaSchedulerApp application, String queue)
CSQueuepublic void finishApplication(org.apache.hadoop.yarn.api.records.ApplicationId application,
String user)
CSQueueuser - user who submitted the applicationpublic CSAssignment assignContainers(org.apache.hadoop.yarn.api.records.Resource clusterResource, FiCaSchedulerNode node, ResourceLimits resourceLimits, SchedulingMode schedulingMode)
CSQueueclusterResource - the resource of the cluster.node - node on which resources are availableresourceLimits - how much overall resource of this queue can use.schedulingMode - Type of exclusive check when assign container on a
NodeManager, see SchedulingMode.public void decreaseContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
SchedContainerChangeRequest decreaseRequest,
FiCaSchedulerApp app)
throws org.apache.hadoop.yarn.exceptions.InvalidResourceRequestException
CSQueueorg.apache.hadoop.yarn.exceptions.InvalidResourceRequestExceptionpublic void unreserveIncreasedContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp app,
FiCaSchedulerNode node,
RMContainer rmContainer)
CSQueuepublic void completedContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
FiCaSchedulerNode node,
RMContainer rmContainer,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event,
CSQueue completedChildQueue,
boolean sortQueues)
CSQueueclusterResource - the resource of the clusterapplication - application to which the container was assignednode - node on which the container completedrmContainer - completed container,
null if it was just a reservationcontainerStatus - ContainerStatus for the completed
containerevent - event to be sent to the containercompletedChildQueue - CSQueue to reinsert in childQueuessortQueues - indicates whether it should re-sort the queuespublic void updateClusterResource(org.apache.hadoop.yarn.api.records.Resource clusterResource,
ResourceLimits resourceLimits)
CSQueueclusterResource - the current cluster resourceresourceLimits - the current ResourceLimitspublic boolean hasChildQueues()
hasChildQueues in class AbstractCSQueuepublic List<CSQueue> getChildQueues()
CSQueuepublic void recoverContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
SchedulerApplicationAttempt attempt,
RMContainer rmContainer)
QueueclusterResource - the resource of the clusterattempt - the application for which the container was allocatedrmContainer - the container that was recovered.public ActiveUsersManager getActiveUsersManager()
CSQueueActiveUsersManager for the queue.ActiveUsersManager for the queuepublic void collectSchedulerApplications(Collection<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> apps)
CSQueueapps - the collection to add the applications topublic void attachContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
RMContainer rmContainer)
CSQueueclusterResource - the current cluster resourceapplication - application to which the container was assignedrmContainer - the container to attachpublic void detachContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
FiCaSchedulerApp application,
RMContainer rmContainer)
CSQueueclusterResource - the current cluster resourceapplication - application to which the container was assignedrmContainer - the container to detachpublic int getNumApplications()
CSQueueCopyright © 2017 Apache Software Foundation. All Rights Reserved.