@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class FSQueue extends Schedulable implements Queue
| Modifier and Type | Field and Description |
|---|---|
protected FSParentQueue |
parent |
protected SchedulingPolicy |
policy |
protected org.apache.hadoop.yarn.factories.RecordFactory |
recordFactory |
protected FairScheduler |
scheduler |
| Constructor and Description |
|---|
FSQueue(String name,
FairScheduler scheduler,
FSParentQueue parent) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
assignContainerPreCheck(FSSchedulerNode node)
Helper method to check if the queue should attempt assigning resources
|
abstract void |
collectSchedulerApplications(Collection<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> apps)
Adds all applications in the queue and its subqueues to the given collection.
|
abstract List<FSQueue> |
getChildQueues()
Gets the children of this queue, if any.
|
org.apache.hadoop.yarn.api.records.Resource |
getMaxShare()
Maximum Resource share assigned to the schedulable.
|
FSQueueMetrics |
getMetrics()
Get the queue metrics
|
org.apache.hadoop.yarn.api.records.Resource |
getMinShare()
Minimum Resource share assigned to the schedulable.
|
String |
getName()
Name of job/queue, used for debugging as well as for breaking ties in
scheduling order deterministically.
|
abstract int |
getNumRunnableApps()
Return the number of apps for which containers can be allocated.
|
FSParentQueue |
getParent() |
SchedulingPolicy |
getPolicy() |
org.apache.hadoop.yarn.api.records.Priority |
getPriority()
Job priority for jobs in FIFO queues; meaningless for QueueSchedulables.
|
org.apache.hadoop.yarn.api.records.QueueInfo |
getQueueInfo(boolean includeChildQueues,
boolean recursive)
Get queue information
|
String |
getQueueName()
Get the queue name
|
long |
getStartTime()
Start time for jobs in FIFO queues; meaningless for QueueSchedulables.
|
ResourceWeights |
getWeights()
Job/queue weight in fair sharing.
|
boolean |
hasAccess(org.apache.hadoop.yarn.api.records.QueueACL acl,
org.apache.hadoop.security.UserGroupInformation user) |
protected boolean |
preemptContainerPreCheck()
Helper method to check if the queue should preempt containers
|
abstract void |
recomputeShares()
Recomputes the shares for all child queues and applications based on this
queue's current share
|
void |
setFairShare(org.apache.hadoop.yarn.api.records.Resource fairShare)
Assign a fair share to this Schedulable.
|
abstract void |
setPolicy(SchedulingPolicy policy) |
protected void |
throwPolicyDoesnotApplyException(SchedulingPolicy policy) |
assignContainer, getDemand, getFairShare, getResourceUsage, preemptContainer, toString, updateDemandclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetActiveUsersManager, getQueueUserAclInfo, recoverContainerprotected final FairScheduler scheduler
protected final FSParentQueue parent
protected final org.apache.hadoop.yarn.factories.RecordFactory recordFactory
protected SchedulingPolicy policy
public FSQueue(String name, FairScheduler scheduler, FSParentQueue parent)
public String getName()
SchedulablegetName in class Schedulablepublic String getQueueName()
QueuegetQueueName in interface Queuepublic SchedulingPolicy getPolicy()
public FSParentQueue getParent()
protected void throwPolicyDoesnotApplyException(SchedulingPolicy policy) throws AllocationConfigurationException
AllocationConfigurationExceptionpublic abstract void setPolicy(SchedulingPolicy policy) throws AllocationConfigurationException
AllocationConfigurationExceptionpublic ResourceWeights getWeights()
SchedulablegetWeights in class Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getMinShare()
SchedulablegetMinShare in class Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getMaxShare()
SchedulablegetMaxShare in class Schedulablepublic long getStartTime()
SchedulablegetStartTime in class Schedulablepublic org.apache.hadoop.yarn.api.records.Priority getPriority()
SchedulablegetPriority in class Schedulablepublic org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(boolean includeChildQueues,
boolean recursive)
QueuegetQueueInfo in interface QueueincludeChildQueues - include child queues?recursive - recursively get child queue information?public FSQueueMetrics getMetrics()
QueuegetMetrics in interface Queuepublic void setFairShare(org.apache.hadoop.yarn.api.records.Resource fairShare)
SchedulablesetFairShare in class Schedulablepublic boolean hasAccess(org.apache.hadoop.yarn.api.records.QueueACL acl,
org.apache.hadoop.security.UserGroupInformation user)
public abstract void recomputeShares()
public abstract List<FSQueue> getChildQueues()
public abstract void collectSchedulerApplications(Collection<org.apache.hadoop.yarn.api.records.ApplicationAttemptId> apps)
apps - the collection to add the applications topublic abstract int getNumRunnableApps()
protected boolean assignContainerPreCheck(FSSchedulerNode node)
protected boolean preemptContainerPreCheck()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.