@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, toString
public AppSchedulable(FairScheduler scheduler, FSSchedulerApp app, FSLeafQueue queue)
public String getName()
Schedulable
getName
in class Schedulable
public FSSchedulerApp getApp()
public void updateDemand()
Schedulable
updateDemand
in class Schedulable
public Resource getDemand()
Schedulable
getDemand
in class Schedulable
public long getStartTime()
Schedulable
getStartTime
in class Schedulable
public Resource getResourceUsage()
Schedulable
getResourceUsage
in class Schedulable
public Resource getMinShare()
Schedulable
getMinShare
in class Schedulable
public Resource getMaxShare()
Schedulable
getMaxShare
in class Schedulable
public QueueMetrics getMetrics()
public ResourceWeights getWeights()
Schedulable
getWeights
in class Schedulable
public Priority getPriority()
Schedulable
getPriority
in class Schedulable
public 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)
Schedulable
assignContainer
in class Schedulable
public boolean hasContainerForNode(Priority prio, FSSchedulerNode node)
Copyright © 2013 Apache Software Foundation. All rights reserved.