|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSAppAttempt
@InterfaceAudience.Private @InterfaceStability.Unstable public class FSAppAttempt
Represents an application attempt from the viewpoint of the Fair Scheduler.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt |
|---|
SchedulerApplicationAttempt.ContainersAndNMTokensAllocation |
| Field Summary |
|---|
| Fields inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt |
|---|
appSchedulingInfo, currentConsumption, currentReservation, isStopped, lastMemoryAggregateAllocationUpdateTime, lastScheduledContainer, liveContainers, newlyAllocatedContainers, queue, reservedContainers, rmContext |
| Constructor Summary | |
|---|---|
FSAppAttempt(FairScheduler scheduler,
org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
String user,
FSLeafQueue queue,
ActiveUsersManager activeUsersManager,
RMContext rmContext)
|
|
| Method Summary | |
|---|---|
void |
addPreemption(RMContainer container,
long time)
|
RMContainer |
allocate(NodeType type,
FSSchedulerNode node,
org.apache.hadoop.yarn.api.records.Priority priority,
org.apache.hadoop.yarn.api.records.ResourceRequest request,
org.apache.hadoop.yarn.api.records.Container container)
|
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)
Called when this application already has an existing reservation on the given node. |
void |
clearPreemptedResources()
|
void |
containerCompleted(RMContainer rmContainer,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event)
|
org.apache.hadoop.yarn.api.records.Container |
createContainer(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. |
NodeType |
getAllowedLocalityLevel(org.apache.hadoop.yarn.api.records.Priority priority,
int numNodes,
double nodeLocalityThreshold,
double rackLocalityThreshold)
Return the level at which we are allowed to schedule containers, given the current size of the cluster and thresholds indicating how many nodes to fail at (as a fraction of cluster size) before relaxing scheduling constraints. |
NodeType |
getAllowedLocalityLevelByTime(org.apache.hadoop.yarn.api.records.Priority priority,
long nodeLocalityDelayMs,
long rackLocalityDelayMs,
long currentTimeMs)
Return the level at which we are allowed to schedule containers. |
Long |
getContainerPreemptionTime(RMContainer container)
|
org.apache.hadoop.yarn.api.records.Resource |
getDemand()
Maximum number of resources required by this Schedulable. |
org.apache.hadoop.yarn.api.records.Resource |
getFairShare()
Get the fair share assigned to this Schedulable. |
org.apache.hadoop.yarn.api.records.Resource |
getHeadroom()
Get available headroom in terms of resources for the application's user. |
float |
getLocalityWaitFactor(org.apache.hadoop.yarn.api.records.Priority priority,
int clusterNodes)
|
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.Resource |
getPreemptedResources()
|
Set<RMContainer> |
getPreemptionContainers()
|
org.apache.hadoop.yarn.api.records.Priority |
getPriority()
Job priority for jobs in FIFO queues; meaningless for QueueSchedulables. |
FSLeafQueue |
getQueue()
|
org.apache.hadoop.yarn.api.records.Resource |
getResourceUsage()
Get the aggregate amount of resources consumed by the schedulable. |
ResourceWeights |
getResourceWeights()
|
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. |
RMContainer |
preemptContainer()
Preempt a running container according to the priority |
void |
resetAllowedLocalityLevel(org.apache.hadoop.yarn.api.records.Priority priority,
NodeType level)
Should be called when the scheduler assigns a container at a higher degree of locality than the current threshold. |
void |
resetPreemptedResources()
|
void |
setFairShare(org.apache.hadoop.yarn.api.records.Resource fairShare)
Assign a fair share to this Schedulable. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FSAppAttempt(FairScheduler scheduler,
org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
String user,
FSLeafQueue queue,
ActiveUsersManager activeUsersManager,
RMContext rmContext)
| Method Detail |
|---|
public ResourceWeights getResourceWeights()
public QueueMetrics getMetrics()
public void containerCompleted(RMContainer rmContainer,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus,
RMContainerEventType event)
public org.apache.hadoop.yarn.api.records.Resource getHeadroom()
SchedulerApplicationAttempt
getHeadroom in class SchedulerApplicationAttempt
public float getLocalityWaitFactor(org.apache.hadoop.yarn.api.records.Priority priority,
int clusterNodes)
public NodeType getAllowedLocalityLevel(org.apache.hadoop.yarn.api.records.Priority priority,
int numNodes,
double nodeLocalityThreshold,
double rackLocalityThreshold)
public NodeType getAllowedLocalityLevelByTime(org.apache.hadoop.yarn.api.records.Priority priority,
long nodeLocalityDelayMs,
long rackLocalityDelayMs,
long currentTimeMs)
public RMContainer allocate(NodeType type,
FSSchedulerNode node,
org.apache.hadoop.yarn.api.records.Priority priority,
org.apache.hadoop.yarn.api.records.ResourceRequest request,
org.apache.hadoop.yarn.api.records.Container container)
public void resetAllowedLocalityLevel(org.apache.hadoop.yarn.api.records.Priority priority,
NodeType level)
public void addPreemption(RMContainer container,
long time)
public Long getContainerPreemptionTime(RMContainer container)
public Set<RMContainer> getPreemptionContainers()
public FSLeafQueue getQueue()
getQueue in class SchedulerApplicationAttemptpublic org.apache.hadoop.yarn.api.records.Resource getPreemptedResources()
public void resetPreemptedResources()
public void clearPreemptedResources()
public org.apache.hadoop.yarn.api.records.Container createContainer(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 SchedulerNode handlers as well.
public org.apache.hadoop.yarn.api.records.Resource assignReservedContainer(FSSchedulerNode node)
node - Node that the application has an existing reservation on
public boolean hasContainerForNode(org.apache.hadoop.yarn.api.records.Priority prio,
FSSchedulerNode node)
public String getName()
Schedulable
getName in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getDemand()
Schedulable
getDemand in interface Schedulablepublic long getStartTime()
Schedulable
getStartTime in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getMinShare()
Schedulable
getMinShare in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getMaxShare()
Schedulable
getMaxShare in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getResourceUsage()
Schedulable
getResourceUsage in interface Schedulablepublic ResourceWeights getWeights()
Schedulable
getWeights in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Priority getPriority()
Schedulable
getPriority in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getFairShare()
Schedulable
getFairShare in interface Schedulablepublic void setFairShare(org.apache.hadoop.yarn.api.records.Resource fairShare)
Schedulable
setFairShare in interface Schedulablepublic void updateDemand()
Schedulable
updateDemand in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource assignContainer(FSSchedulerNode node)
Schedulable
assignContainer in interface Schedulablepublic RMContainer preemptContainer()
preemptContainer in interface Schedulable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||