@InterfaceAudience.Private @InterfaceStability.Unstable public class AppSchedulable extends Schedulable
| Constructor and Description |
|---|
AppSchedulable(FairScheduler scheduler,
FSSchedulerApp app,
FSLeafQueue queue) |
| Modifier and Type | Method and Description |
|---|---|
Resource |
assignContainer(FSSchedulerNode node)
Assign a container on this node if possible, and return the amount of
resources assigned.
|
Resource |
assignReservedContainer(FSSchedulerNode node) |
Container |
createContainer(FSSchedulerApp application,
FSSchedulerNode node,
Resource capability,
Priority priority)
Create and return a container object reflecting an allocation for the
given appliction on the given node with the given capability and
priority.
|
FSSchedulerApp |
getApp() |
Resource |
getDemand()
Maximum number of resources required by this Schedulable.
|
Resource |
getMaxShare()
Maximum Resource share assigned to the schedulable.
|
QueueMetrics |
getMetrics()
Get metrics reference from containing queue.
|
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.
|
Priority |
getPriority()
Job priority for jobs in FIFO queues; meaningless for QueueSchedulables.
|
Resource |
getResourceUsage()
Get the aggregate amount of resources consumed by the schedulable.
|
boolean |
getRunnable()
Is this application runnable? Runnable means that the user and queue
application counts are within configured quotas.
|
long |
getStartTime()
Start time for jobs in FIFO queues; meaningless for QueueSchedulables.
|
ResourceWeights |
getWeights()
Job/queue weight in fair sharing.
|
boolean |
hasContainerForNode(Priority prio,
FSSchedulerNode node)
Whether this app has containers requests that could be satisfied on the
given node, if the node had full space.
|
void |
setRunnable(boolean runnable) |
void |
unreserve(Priority priority,
FSSchedulerNode node)
Remove the reservation on
node at the given
Priority. |
void |
updateDemand()
Refresh the Schedulable's demand and those of its children if any.
|
getFairShare, setFairShare, toStringpublic AppSchedulable(FairScheduler scheduler, FSSchedulerApp app, FSLeafQueue queue)
public String getName()
SchedulablegetName in class Schedulablepublic FSSchedulerApp getApp()
public void updateDemand()
SchedulableupdateDemand in class Schedulablepublic Resource getDemand()
SchedulablegetDemand in class Schedulablepublic long getStartTime()
SchedulablegetStartTime in class Schedulablepublic Resource getResourceUsage()
SchedulablegetResourceUsage in class Schedulablepublic Resource getMinShare()
SchedulablegetMinShare in class Schedulablepublic Resource getMaxShare()
SchedulablegetMaxShare in class Schedulablepublic QueueMetrics getMetrics()
public ResourceWeights getWeights()
SchedulablegetWeights in class Schedulablepublic Priority getPriority()
SchedulablegetPriority in class Schedulablepublic boolean getRunnable()
public void setRunnable(boolean runnable)
public Container createContainer(FSSchedulerApp application, FSSchedulerNode node, Resource capability, Priority priority)
public void unreserve(Priority priority, FSSchedulerNode node)
node at the given
Priority. This dispatches to the SchedulerApp and SchedulerNode
handlers for an unreservation.public Resource assignReservedContainer(FSSchedulerNode node)
public Resource assignContainer(FSSchedulerNode node)
SchedulableassignContainer in class Schedulablepublic boolean hasContainerForNode(Priority prio, FSSchedulerNode node)
Copyright © 2013 Apache Software Foundation. All rights reserved.