|
||||||||||
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.SchedulerApplication
@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class SchedulerApplication
Represents an application attempt from the viewpoint of the scheduler. Each running app attempt in the RM corresponds to one instance of this class.
Field Summary | |
---|---|
protected AppSchedulingInfo |
appSchedulingInfo
|
protected org.apache.hadoop.yarn.api.records.Resource |
currentConsumption
|
protected org.apache.hadoop.yarn.api.records.Resource |
currentReservation
|
protected boolean |
isStopped
|
protected Map<org.apache.hadoop.yarn.api.records.Priority,Long> |
lastScheduledContainer
|
protected Map<org.apache.hadoop.yarn.api.records.ContainerId,RMContainer> |
liveContainers
|
protected List<RMContainer> |
newlyAllocatedContainers
|
protected Queue |
queue
|
protected Map<org.apache.hadoop.yarn.api.records.Priority,Map<org.apache.hadoop.yarn.api.records.NodeId,RMContainer>> |
reservedContainers
|
protected RMContext |
rmContext
|
Constructor Summary | |
---|---|
SchedulerApplication(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
String user,
Queue queue,
ActiveUsersManager activeUsersManager,
RMContext rmContext)
|
Method Summary | |
---|---|
protected void |
addReReservation(org.apache.hadoop.yarn.api.records.Priority priority)
|
void |
addSchedulingOpportunity(org.apache.hadoop.yarn.api.records.Priority priority)
|
void |
containerLaunchedOnNode(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.NodeId nodeId)
|
org.apache.hadoop.yarn.api.records.ApplicationAttemptId |
getApplicationAttemptId()
Get ApplicationAttemptId of the application master. |
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId()
|
org.apache.hadoop.yarn.api.records.Resource |
getCurrentConsumption()
|
org.apache.hadoop.yarn.api.records.Resource |
getCurrentReservation()
Get total current reservations. |
org.apache.hadoop.yarn.api.records.Resource |
getHeadroom()
Get available headroom in terms of resources for the application's user. |
Collection<RMContainer> |
getLiveContainers()
Get the live containers of the application. |
int |
getNewContainerId()
|
int |
getNumReservedContainers(org.apache.hadoop.yarn.api.records.Priority priority)
|
Collection<org.apache.hadoop.yarn.api.records.Priority> |
getPriorities()
|
Queue |
getQueue()
|
String |
getQueueName()
|
int |
getReReservations(org.apache.hadoop.yarn.api.records.Priority priority)
|
List<RMContainer> |
getReservedContainers()
Get the list of reserved containers |
org.apache.hadoop.yarn.api.records.Resource |
getResource(org.apache.hadoop.yarn.api.records.Priority priority)
|
org.apache.hadoop.yarn.api.records.ResourceRequest |
getResourceRequest(org.apache.hadoop.yarn.api.records.Priority priority,
String resourceName)
|
Map<String,org.apache.hadoop.yarn.api.records.ResourceRequest> |
getResourceRequests(org.apache.hadoop.yarn.api.records.Priority priority)
|
RMContainer |
getRMContainer(org.apache.hadoop.yarn.api.records.ContainerId id)
|
int |
getSchedulingOpportunities(org.apache.hadoop.yarn.api.records.Priority priority)
Return the number of times the application has been given an opportunity to schedule a task at the given priority since the last time it successfully did so. |
int |
getTotalRequiredResources(org.apache.hadoop.yarn.api.records.Priority priority)
|
String |
getUser()
|
boolean |
isBlacklisted(String resourceName)
|
boolean |
isPending()
Is this application pending? |
boolean |
isReserved(SchedulerNode node,
org.apache.hadoop.yarn.api.records.Priority priority)
Has the application reserved the given node at the
given priority ? |
boolean |
isStopped()
|
List<org.apache.hadoop.yarn.api.records.Container> |
pullNewlyAllocatedContainers()
|
RMContainer |
reserve(SchedulerNode node,
org.apache.hadoop.yarn.api.records.Priority priority,
RMContainer rmContainer,
org.apache.hadoop.yarn.api.records.Container container)
|
protected void |
resetReReservations(org.apache.hadoop.yarn.api.records.Priority priority)
|
void |
resetSchedulingOpportunities(org.apache.hadoop.yarn.api.records.Priority priority)
Should be called when an application has successfully scheduled a container, or when the scheduling locality threshold is relaxed. |
void |
resetSchedulingOpportunities(org.apache.hadoop.yarn.api.records.Priority priority,
long currentTimeMs)
|
void |
setHeadroom(org.apache.hadoop.yarn.api.records.Resource globalLimit)
|
void |
showRequests()
|
void |
stop(RMAppAttemptState rmAppAttemptFinalState)
|
void |
subtractSchedulingOpportunity(org.apache.hadoop.yarn.api.records.Priority priority)
|
void |
updateBlacklist(List<String> blacklistAdditions,
List<String> blacklistRemovals)
|
void |
updateResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> requests)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final AppSchedulingInfo appSchedulingInfo
protected final Map<org.apache.hadoop.yarn.api.records.ContainerId,RMContainer> liveContainers
protected final Map<org.apache.hadoop.yarn.api.records.Priority,Map<org.apache.hadoop.yarn.api.records.NodeId,RMContainer>> reservedContainers
protected final org.apache.hadoop.yarn.api.records.Resource currentReservation
protected final org.apache.hadoop.yarn.api.records.Resource currentConsumption
protected List<RMContainer> newlyAllocatedContainers
protected Map<org.apache.hadoop.yarn.api.records.Priority,Long> lastScheduledContainer
protected final Queue queue
protected boolean isStopped
protected final RMContext rmContext
Constructor Detail |
---|
public SchedulerApplication(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, String user, Queue queue, ActiveUsersManager activeUsersManager, RMContext rmContext)
Method Detail |
---|
public Collection<RMContainer> getLiveContainers()
public boolean isPending()
public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
ApplicationAttemptId
of the application master.
ApplicationAttemptId
of the application masterpublic org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
public String getUser()
public Map<String,org.apache.hadoop.yarn.api.records.ResourceRequest> getResourceRequests(org.apache.hadoop.yarn.api.records.Priority priority)
public int getNewContainerId()
public Collection<org.apache.hadoop.yarn.api.records.Priority> getPriorities()
public org.apache.hadoop.yarn.api.records.ResourceRequest getResourceRequest(org.apache.hadoop.yarn.api.records.Priority priority, String resourceName)
public int getTotalRequiredResources(org.apache.hadoop.yarn.api.records.Priority priority)
public org.apache.hadoop.yarn.api.records.Resource getResource(org.apache.hadoop.yarn.api.records.Priority priority)
public String getQueueName()
public RMContainer getRMContainer(org.apache.hadoop.yarn.api.records.ContainerId id)
protected void resetReReservations(org.apache.hadoop.yarn.api.records.Priority priority)
protected void addReReservation(org.apache.hadoop.yarn.api.records.Priority priority)
public int getReReservations(org.apache.hadoop.yarn.api.records.Priority priority)
@InterfaceStability.Stable @InterfaceAudience.Private public org.apache.hadoop.yarn.api.records.Resource getCurrentReservation()
public Queue getQueue()
public void updateResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> requests)
public void stop(RMAppAttemptState rmAppAttemptFinalState)
public boolean isStopped()
public List<RMContainer> getReservedContainers()
public RMContainer reserve(SchedulerNode node, org.apache.hadoop.yarn.api.records.Priority priority, RMContainer rmContainer, org.apache.hadoop.yarn.api.records.Container container)
public boolean isReserved(SchedulerNode node, org.apache.hadoop.yarn.api.records.Priority priority)
node
at the
given priority
?
node
- node to be checkedpriority
- priority of reserved container
public void setHeadroom(org.apache.hadoop.yarn.api.records.Resource globalLimit)
public org.apache.hadoop.yarn.api.records.Resource getHeadroom()
public int getNumReservedContainers(org.apache.hadoop.yarn.api.records.Priority priority)
public void containerLaunchedOnNode(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.NodeId nodeId)
public void showRequests()
public org.apache.hadoop.yarn.api.records.Resource getCurrentConsumption()
public List<org.apache.hadoop.yarn.api.records.Container> pullNewlyAllocatedContainers()
public void updateBlacklist(List<String> blacklistAdditions, List<String> blacklistRemovals)
public boolean isBlacklisted(String resourceName)
public void addSchedulingOpportunity(org.apache.hadoop.yarn.api.records.Priority priority)
public void subtractSchedulingOpportunity(org.apache.hadoop.yarn.api.records.Priority priority)
public int getSchedulingOpportunities(org.apache.hadoop.yarn.api.records.Priority priority)
public void resetSchedulingOpportunities(org.apache.hadoop.yarn.api.records.Priority priority)
priority
- The priority of the container scheduled.public void resetSchedulingOpportunities(org.apache.hadoop.yarn.api.records.Priority priority, long currentTimeMs)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |