@InterfaceAudience.Private @InterfaceStability.Unstable public class FSAppAttempt extends SchedulerApplicationAttempt implements Schedulable
SchedulerApplicationAttempt.AMStateappAMNodePartitionName, 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.
|
boolean |
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, updateSchedulingRequestspublic 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 SchedulerApplicationAttemptpublic 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 SchedulerApplicationAttemptpublic boolean recoverContainer(SchedulerNode node, RMContainer rmContainer)
recoverContainer in class SchedulerApplicationAttemptpublic 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()
SchedulablegetName in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getDemand()
SchedulablegetDemand in interface Schedulablepublic long getStartTime()
SchedulableEntitygetStartTime in interface SchedulablegetStartTime in interface SchedulableEntitygetStartTime in class SchedulerApplicationAttemptpublic org.apache.hadoop.yarn.api.records.Resource getMinShare()
SchedulablegetMinShare in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getMaxShare()
SchedulablegetMaxShare in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource getResourceUsage()
SchedulablegetResourceUsage in interface Schedulablepublic float getWeight()
SchedulablegetWeight in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Priority getPriority()
SchedulableEntitygetPriority in interface SchedulablegetPriority in interface SchedulableEntitygetPriority in class SchedulerApplicationAttemptpublic org.apache.hadoop.yarn.api.records.Resource getFairShare()
SchedulablegetFairShare in interface Schedulablepublic void setFairShare(org.apache.hadoop.yarn.api.records.Resource fairShare)
SchedulablesetFairShare in interface SchedulablefairShare - a fair share to this Schedulable.public void updateDemand()
SchedulableupdateDemand in interface Schedulablepublic org.apache.hadoop.yarn.api.records.Resource assignContainer(FSSchedulerNode node)
SchedulableassignContainer in interface Schedulablenode - FSSchedulerNode.public int hashCode()
hashCode in class SchedulerApplicationAttemptpublic boolean equals(Object o)
equals in class SchedulerApplicationAttemptpublic boolean isPreemptable()
SchedulableisPreemptable in interface Schedulabletrue if the schedulable is preemptable;
false otherwise@VisibleForTesting public void setEnableAMPreemption(boolean enableAMPreemption)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.