@InterfaceAudience.Private @InterfaceStability.Unstable public class FSAppAttempt extends SchedulerApplicationAttempt implements Schedulable
SchedulerApplicationAttempt.AMState
appAMNodePartitionName, appSchedulingInfo, attemptId, attemptOpportunisticResourceUsage, attemptResourceUsage, attemptResourceUsageAllocatedRemotely, isStopped, lastMemoryAggregateAllocationUpdateTime, lastScheduledContainer, liveContainers, newlyAllocatedContainers, newlyDecreasedContainers, newlyDemotedContainers, newlyIncreasedContainers, newlyPromotedContainers, queue, readLock, reservedContainers, rmContext, tempContainerToKill, updateContainerErrors, updatedNMTokens, writeLock
Constructor and Description |
---|
FSAppAttempt(FairScheduler scheduler,
org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
String user,
FSLeafQueue queue,
ActiveUsersManager activeUsersManager,
RMContext rmContext) |
Modifier and Type | Method and Description |
---|---|
RMContainer |
allocate(NodeType type,
FSSchedulerNode node,
org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey,
PendingAsk pendingAsk,
org.apache.hadoop.yarn.api.records.Container reservedContainer) |
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.
|
boolean |
equals(Object o) |
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()
Headroom depends on resources in the cluster, current usage of the
queue, queue's fair-share and queue's max-resources.
|
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()
Get the priority of the application
|
FSLeafQueue |
getQueue() |
org.apache.hadoop.yarn.api.records.Resource |
getResourceUsage()
Get the aggregate amount of resources consumed by the schedulable.
|
long |
getStartTime()
Start time of the job.
|
float |
getWeight()
Job/queue weight in fair sharing.
|
int |
hashCode() |
boolean |
isPreemptable()
Check whether the schedulable is preemptable.
|
void |
recoverContainer(SchedulerNode node,
RMContainer rmContainer) |
void |
setEnableAMPreemption(boolean enableAMPreemption) |
void |
setFairShare(org.apache.hadoop.yarn.api.records.Resource fairShare)
Assign a fair share to this Schedulable.
|
String |
toString() |
void |
unreserve(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey,
FSSchedulerNode node)
Remove the reservation on
node at the given SchedulerRequestKey. |
void |
updateDemand()
Refresh the Schedulable's demand and those of its children if any.
|
addMissedNonPartitionedRequestSchedulingOpportunity, addReReservation, addRMContainer, addSchedulingOpportunity, addToNewlyAllocatedContainers, addToNewlyDecreasedContainers, addToNewlyDemotedContainers, addToUpdateContainerErrors, compareInputOrderTo, containerLaunchedOnNode, decUnconfirmedRes, getActivedAppDiagnosticMessage, getAMResource, getAMResource, getAppAMNodePartitionName, getAppAttemptResourceUsage, getApplicationAttemptId, getApplicationId, getApplicationSchedulingEnvs, getAppPlacementAllocator, getAppSchedulingInfo, getBlacklistedNodes, getCurrentConsumption, getCurrentReservation, getId, getLastScheduledContainer, getLiveContainers, getLiveContainersMap, getNewContainerId, getNumReservedContainers, getOpportunisticContainerContext, getOutstandingAsksCount, getOutstandingAsksCount, getPartition, getPendingAppDiagnosticMessage, getPendingAsk, getPendingRelease, getQueueName, getReReservations, getReservedContainers, getResourceUsageReport, getRMContainer, getSchedulerKeys, getSchedulingOpportunities, getSchedulingResourceUsage, getUnmanagedAM, getUpdateContext, getUser, getWriteLock, hasPendingResourceRequest, incNumAllocatedContainers, incUnconfirmedRes, isAmRunning, isPending, isPlaceBlacklisted, isRecovering, isStopped, isWaitingForAMContainer, move, pullNewlyAllocatedContainers, pullNewlyDecreasedContainers, pullNewlyDemotedContainers, pullNewlyIncreasedContainers, pullNewlyPromotedContainers, pullPreviousAttemptContainers, pullUpdateContainerErrors, pullUpdatedNMTokens, recordContainerAllocationTime, recordContainerRequestTime, recoverResourceRequestsForContainer, removeRMContainer, reserve, reserveIncreasedContainer, resetMissedNonPartitionedRequestSchedulingOpportunity, resetReReservations, resetSchedulingOpportunities, resetSchedulingOpportunities, setAMResource, setAMResource, setAmRunning, setAppAMNodePartitionName, setApplicationHeadroomForMetrics, setAttemptRecovering, setHeadroom, setOpportunisticContainerContext, setPriority, showRequests, stop, subtractSchedulingOpportunity, transferStateFromPreviousAttempt, updateAMContainerDiagnostics, updateBlacklist, updateNMTokens, updateResourceRequests, updateSchedulingRequests
public FSAppAttempt(FairScheduler scheduler, org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, String user, FSLeafQueue queue, ActiveUsersManager activeUsersManager, RMContext rmContext)
public QueueMetrics getMetrics()
public org.apache.hadoop.yarn.api.records.Resource getHeadroom()
getHeadroom
in class SchedulerApplicationAttempt
public RMContainer allocate(NodeType type, FSSchedulerNode node, org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey, PendingAsk pendingAsk, org.apache.hadoop.yarn.api.records.Container reservedContainer)
public FSLeafQueue getQueue()
getQueue
in class SchedulerApplicationAttempt
public void recoverContainer(SchedulerNode node, RMContainer rmContainer)
recoverContainer
in class SchedulerApplicationAttempt
public void unreserve(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey, FSSchedulerNode node)
node
at the given SchedulerRequestKey.
This dispatches SchedulerNode handlers as well.schedulerKey
- Scheduler Keynode
- Nodepublic String getName()
Schedulable
getName
in interface Schedulable
public org.apache.hadoop.yarn.api.records.Resource getDemand()
Schedulable
getDemand
in interface Schedulable
public long getStartTime()
SchedulableEntity
getStartTime
in interface Schedulable
getStartTime
in interface SchedulableEntity
getStartTime
in class SchedulerApplicationAttempt
public org.apache.hadoop.yarn.api.records.Resource getMinShare()
Schedulable
getMinShare
in interface Schedulable
public org.apache.hadoop.yarn.api.records.Resource getMaxShare()
Schedulable
getMaxShare
in interface Schedulable
public org.apache.hadoop.yarn.api.records.Resource getResourceUsage()
Schedulable
getResourceUsage
in interface Schedulable
public float getWeight()
Schedulable
getWeight
in interface Schedulable
public org.apache.hadoop.yarn.api.records.Priority getPriority()
SchedulableEntity
getPriority
in interface Schedulable
getPriority
in interface SchedulableEntity
getPriority
in class SchedulerApplicationAttempt
public org.apache.hadoop.yarn.api.records.Resource getFairShare()
Schedulable
getFairShare
in interface Schedulable
public void setFairShare(org.apache.hadoop.yarn.api.records.Resource fairShare)
Schedulable
setFairShare
in interface Schedulable
public void updateDemand()
Schedulable
updateDemand
in interface Schedulable
public org.apache.hadoop.yarn.api.records.Resource assignContainer(FSSchedulerNode node)
Schedulable
assignContainer
in interface Schedulable
public int hashCode()
hashCode
in class SchedulerApplicationAttempt
public boolean equals(Object o)
equals
in class SchedulerApplicationAttempt
public boolean isPreemptable()
Schedulable
isPreemptable
in interface Schedulable
true
if the schedulable is preemptable;
false
otherwisepublic void setEnableAMPreemption(boolean enableAMPreemption)
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.