@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 |
|---|---|
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.
|
org.apache.hadoop.yarn.api.records.Resource |
assignReservedContainer(FSSchedulerNode node) |
org.apache.hadoop.yarn.api.records.Container |
createContainer(FSSchedulerApp application,
FSSchedulerNode node,
org.apache.hadoop.yarn.api.records.Resource capability,
org.apache.hadoop.yarn.api.records.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() |
org.apache.hadoop.yarn.api.records.Resource |
getDemand()
Maximum number of resources required by this Schedulable.
|
org.apache.hadoop.yarn.api.records.Resource |
getMaxShare()
Maximum Resource share assigned to the schedulable.
|
QueueMetrics |
getMetrics()
Get metrics reference from containing queue.
|
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.
|
org.apache.hadoop.yarn.api.records.Priority |
getPriority()
Job priority for jobs in FIFO queues; meaningless for QueueSchedulables.
|
org.apache.hadoop.yarn.api.records.Resource |
getResourceUsage()
Get the aggregate amount of resources consumed by the schedulable.
|
long |
getStartTime()
Start time for jobs in FIFO queues; meaningless for QueueSchedulables.
|
ResourceWeights |
getWeights()
Job/queue weight in fair sharing.
|
boolean |
hasContainerForNode(org.apache.hadoop.yarn.api.records.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 |
unreserve(org.apache.hadoop.yarn.api.records.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 org.apache.hadoop.yarn.api.records.Resource getDemand()
SchedulablegetDemand in class Schedulablepublic long getStartTime()
SchedulablegetStartTime in class Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getResourceUsage()
SchedulablegetResourceUsage 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 QueueMetrics getMetrics()
public ResourceWeights getWeights()
SchedulablegetWeights in class Schedulablepublic org.apache.hadoop.yarn.api.records.Priority getPriority()
SchedulablegetPriority in class Schedulablepublic org.apache.hadoop.yarn.api.records.Container createContainer(FSSchedulerApp application, FSSchedulerNode node, org.apache.hadoop.yarn.api.records.Resource capability, org.apache.hadoop.yarn.api.records.Priority priority)
public void unreserve(org.apache.hadoop.yarn.api.records.Priority priority,
FSSchedulerNode node)
node at the given
Priority. This dispatches to the SchedulerApp and SchedulerNode
handlers for an unreservation.public org.apache.hadoop.yarn.api.records.Resource assignReservedContainer(FSSchedulerNode node)
public org.apache.hadoop.yarn.api.records.Resource assignContainer(FSSchedulerNode node)
SchedulableassignContainer in class Schedulablepublic boolean hasContainerForNode(org.apache.hadoop.yarn.api.records.Priority prio,
FSSchedulerNode node)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.