@InterfaceAudience.Private @InterfaceStability.Unstable public class FSLeafQueue extends FSQueue
maxAMShare, maxContainerAllocation, maxRunningApps, minShare, parent, policy, recordFactory, scheduler, weights
Constructor and Description |
---|
FSLeafQueue(String name,
FairScheduler scheduler,
FSParentQueue parent) |
Modifier and Type | Method and Description |
---|---|
void |
addAssignedApp(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
This method is called when an application is assigned to this queue
for book-keeping purposes (to be able to determine if the queue is empty).
|
org.apache.hadoop.yarn.api.records.Resource |
assignContainer(FSSchedulerNode node)
Assign a container on this node if possible, and return the amount of
resources assigned.
|
boolean |
canRunAppAM(org.apache.hadoop.yarn.api.records.Resource amResource)
Check whether this queue can run the Application Master under the
maxAMShare limit.
|
void |
collectSchedulerApplications(Collection<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> apps)
Adds all applications in the queue and its subqueues to the given collection.
|
protected void |
dumpStateInternal(StringBuilder sb)
Recursively dump states of all queues.
|
ActiveUsersManager |
getAbstractUsersManager() |
List<FSQueue> |
getChildQueues()
Gets the children of this queue, if any.
|
org.apache.hadoop.yarn.api.records.Resource |
getDemand()
Maximum number of resources required by this Schedulable.
|
org.apache.hadoop.yarn.api.records.Resource |
getMaximumContainerAllocation() |
int |
getNumActiveApps()
TODO: Based on how frequently this is called, we might want to club
counting pending and active apps in the same method.
|
int |
getNumAssignedApps() |
int |
getNumPendingApps() |
int |
getNumRunnableApps()
Return the number of apps for which containers can be allocated.
|
List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> |
getQueueUserAclInfo(org.apache.hadoop.security.UserGroupInformation user)
Get queue ACLs for given
user . |
boolean |
isEmpty() |
void |
recoverContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
SchedulerApplicationAttempt schedulerAttempt,
RMContainer rmContainer)
Recover the state of the queue for a given container.
|
void |
removeAssignedApp(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
This method is called when an application is removed from this queue
during the submit process.
|
void |
setWeights(float weight)
Allows setting weight for a dynamically created queue.
|
void |
updateDemand()
Refresh the Schedulable's demand and those of its children if any.
|
decPendingResource, decReservedResource, decUsedResource, dumpState, getAccessibleNodeLabels, getDefaultApplicationPriority, getDefaultNodeLabelExpression, getFairShare, getMaxAMShare, getMaxChildQueueResource, getMaxRunningApps, getMaxShare, getMetrics, getMinShare, getName, getParent, getPolicy, getPriority, getQueueInfo, getQueueName, getQueueStatistics, getRawMaxShare, getReservedResource, getResourceUsage, getStartTime, getSteadyFairShare, getWeight, hasAccess, incPendingResource, incReservedResource, incUsedResource, isActive, isDynamic, isPreemptable, reinit, setDynamic, setFairShare, setMaxAMShare, setMaxChildQueueResource, setMaxContainerAllocation, setMaxRunningApps, setMaxShare, setMinShare, setPolicy, toString, update, verifyAndSetPolicyFromConf
public FSLeafQueue(String name, FairScheduler scheduler, FSParentQueue parent)
public void collectSchedulerApplications(Collection<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> apps)
FSQueue
collectSchedulerApplications
in class FSQueue
apps
- the collection to add the applications topublic org.apache.hadoop.yarn.api.records.Resource getDemand()
Schedulable
public void updateDemand()
Schedulable
public org.apache.hadoop.yarn.api.records.Resource assignContainer(FSSchedulerNode node)
Schedulable
public List<FSQueue> getChildQueues()
FSQueue
getChildQueues
in class FSQueue
public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo(org.apache.hadoop.security.UserGroupInformation user)
Queue
user
.user
- usernamepublic int getNumRunnableApps()
FSQueue
getNumRunnableApps
in class FSQueue
public int getNumPendingApps()
public int getNumAssignedApps()
public int getNumActiveApps()
public ActiveUsersManager getAbstractUsersManager()
public boolean canRunAppAM(org.apache.hadoop.yarn.api.records.Resource amResource)
amResource
- resources required to run the AMpublic void recoverContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource, SchedulerApplicationAttempt schedulerAttempt, RMContainer rmContainer)
Queue
clusterResource
- the resource of the clusterschedulerAttempt
- the application for which the container was allocatedrmContainer
- the container that was recovered.public void setWeights(float weight)
setWeights
in class FSQueue
weight
- queue weightpublic org.apache.hadoop.yarn.api.records.Resource getMaximumContainerAllocation()
getMaximumContainerAllocation
in class FSQueue
protected void dumpStateInternal(StringBuilder sb)
FSQueue
dumpStateInternal
in class FSQueue
sb
- the {code StringBuilder} which holds queue statespublic void addAssignedApp(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
applicationId
- the application's idpublic void removeAssignedApp(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
applicationId
- the application's idCopyright © 2008–2021 Apache Software Foundation. All rights reserved.