parent, policy, recordFactory, scheduler| Constructor and Description |
|---|
FSLeafQueue(String name,
FairScheduler scheduler,
FSParentQueue parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAMResourceUsage(org.apache.hadoop.yarn.api.records.Resource amResource) |
void |
addApp(FSSchedulerApp app,
boolean runnable) |
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 this 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.
|
ActiveUsersManager |
getActiveUsersManager() |
org.apache.hadoop.yarn.api.records.Resource |
getAmResourceUsage() |
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.
|
long |
getLastTimeAtHalfFairShare() |
long |
getLastTimeAtMinShare() |
List<AppSchedulable> |
getNonRunnableAppSchedulables() |
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. |
org.apache.hadoop.yarn.api.records.Resource |
getResourceUsage()
Get the aggregate amount of resources consumed by the schedulable.
|
Collection<AppSchedulable> |
getRunnableAppSchedulables() |
RMContainer |
preemptContainer()
Preempt a container from this Schedulable if possible.
|
void |
recomputeShares()
Recomputes the shares for all child queues and applications based on this
queue's current share
|
void |
recoverContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
SchedulerApplicationAttempt schedulerAttempt,
RMContainer rmContainer)
Recover the state of the queue for a given container.
|
boolean |
removeApp(FSSchedulerApp app)
Removes the given app from this queue.
|
void |
setLastTimeAtHalfFairShare(long lastTimeAtHalfFairShare) |
void |
setLastTimeAtMinShare(long lastTimeAtMinShare) |
void |
setPolicy(SchedulingPolicy policy) |
void |
updateDemand()
Refresh the Schedulable's demand and those of its children if any.
|
assignContainerPreCheck, getMaxShare, getMetrics, getMinShare, getName, getParent, getPolicy, getPriority, getQueueInfo, getQueueName, getStartTime, getWeights, hasAccess, preemptContainerPreCheck, setFairShare, throwPolicyDoesnotApplyExceptiongetFairShare, toStringpublic FSLeafQueue(String name, FairScheduler scheduler, FSParentQueue parent)
public void addApp(FSSchedulerApp app, boolean runnable)
public boolean removeApp(FSSchedulerApp app)
public Collection<AppSchedulable> getRunnableAppSchedulables()
public List<AppSchedulable> getNonRunnableAppSchedulables()
public void collectSchedulerApplications(Collection<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> apps)
FSQueuecollectSchedulerApplications in class FSQueueapps - the collection to add the applications topublic void setPolicy(SchedulingPolicy policy) throws AllocationConfigurationException
setPolicy in class FSQueueAllocationConfigurationExceptionpublic void recomputeShares()
FSQueuerecomputeShares in class FSQueuepublic org.apache.hadoop.yarn.api.records.Resource getDemand()
SchedulablegetDemand in class Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getResourceUsage()
SchedulablegetResourceUsage in class Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getAmResourceUsage()
public void updateDemand()
SchedulableupdateDemand in class Schedulablepublic org.apache.hadoop.yarn.api.records.Resource assignContainer(FSSchedulerNode node)
SchedulableassignContainer in class Schedulablepublic RMContainer preemptContainer()
SchedulablepreemptContainer in class Schedulablepublic List<FSQueue> getChildQueues()
FSQueuegetChildQueues in class FSQueuepublic List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo(org.apache.hadoop.security.UserGroupInformation user)
Queueuser.user - usernamepublic long getLastTimeAtMinShare()
public void setLastTimeAtMinShare(long lastTimeAtMinShare)
public long getLastTimeAtHalfFairShare()
public void setLastTimeAtHalfFairShare(long lastTimeAtHalfFairShare)
public int getNumRunnableApps()
FSQueuegetNumRunnableApps in class FSQueuepublic ActiveUsersManager getActiveUsersManager()
public boolean canRunAppAM(org.apache.hadoop.yarn.api.records.Resource amResource)
amResource - public void addAMResourceUsage(org.apache.hadoop.yarn.api.records.Resource amResource)
public void recoverContainer(org.apache.hadoop.yarn.api.records.Resource clusterResource,
SchedulerApplicationAttempt schedulerAttempt,
RMContainer rmContainer)
QueueclusterResource - the resource of the clusterschedulerAttempt - the application for which the container was allocatedrmContainer - the container that was recovered.Copyright © 2014 Apache Software Foundation. All Rights Reserved.