org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair
Class FSLeafQueue

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.Schedulable
      extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueue
          extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSLeafQueue
All Implemented Interfaces:
Queue

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class FSLeafQueue
extends FSQueue


Field Summary
 
Fields inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueue
parent, policy, recordFactory
 
Constructor Summary
FSLeafQueue(String name, QueueManager queueMgr, FairScheduler scheduler, FSParentQueue parent)
           
 
Method Summary
 void addApp(FSSchedulerApp app)
           
 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.
 Collection<AppSchedulable> getAppSchedulables()
           
 Collection<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<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.
 void recomputeShares()
          Recomputes the shares for all child queues and applications based on this queue's current share
 void removeApp(FSSchedulerApp app)
           
 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.
 
Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueue
assignContainerPreCheck, getMaxShare, getMetrics, getMinShare, getName, getPolicy, getPriority, getQueueInfo, getQueueName, getStartTime, getWeights, hasAccess, setFairShare, throwPolicyDoesnotApplyException
 
Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.Schedulable
getFairShare, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FSLeafQueue

public FSLeafQueue(String name,
                   QueueManager queueMgr,
                   FairScheduler scheduler,
                   FSParentQueue parent)
Method Detail

addApp

public void addApp(FSSchedulerApp app)

removeApp

public void removeApp(FSSchedulerApp app)

getAppSchedulables

public Collection<AppSchedulable> getAppSchedulables()

setPolicy

public void setPolicy(SchedulingPolicy policy)
               throws AllocationConfigurationException
Specified by:
setPolicy in class FSQueue
Throws:
AllocationConfigurationException

recomputeShares

public void recomputeShares()
Description copied from class: FSQueue
Recomputes the shares for all child queues and applications based on this queue's current share

Specified by:
recomputeShares in class FSQueue

getDemand

public org.apache.hadoop.yarn.api.records.Resource getDemand()
Description copied from class: Schedulable
Maximum number of resources required by this Schedulable. This is defined as number of currently utilized resources + number of unlaunched resources (that are either not yet launched or need to be speculated).

Specified by:
getDemand in class Schedulable

getResourceUsage

public org.apache.hadoop.yarn.api.records.Resource getResourceUsage()
Description copied from class: Schedulable
Get the aggregate amount of resources consumed by the schedulable.

Specified by:
getResourceUsage in class Schedulable

updateDemand

public void updateDemand()
Description copied from class: Schedulable
Refresh the Schedulable's demand and those of its children if any.

Specified by:
updateDemand in class Schedulable

assignContainer

public org.apache.hadoop.yarn.api.records.Resource assignContainer(FSSchedulerNode node)
Description copied from class: Schedulable
Assign a container on this node if possible, and return the amount of resources assigned.

Specified by:
assignContainer in class Schedulable

getChildQueues

public Collection<FSQueue> getChildQueues()
Description copied from class: FSQueue
Gets the children of this queue, if any.

Specified by:
getChildQueues in class FSQueue

getQueueUserAclInfo

public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueUserAclInfo(org.apache.hadoop.security.UserGroupInformation user)
Description copied from interface: Queue
Get queue ACLs for given user.

Parameters:
user - username
Returns:
queue ACLs for user

getLastTimeAtMinShare

public long getLastTimeAtMinShare()

setLastTimeAtMinShare

public void setLastTimeAtMinShare(long lastTimeAtMinShare)

getLastTimeAtHalfFairShare

public long getLastTimeAtHalfFairShare()

setLastTimeAtHalfFairShare

public void setLastTimeAtHalfFairShare(long lastTimeAtHalfFairShare)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.