@InterfaceAudience.Private @InterfaceStability.Unstable public class AppSchedulingInfo extends Object
Modifier and Type | Field and Description |
---|---|
ContainerUpdateContext |
updateContext |
Constructor and Description |
---|
AppSchedulingInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
String user,
Queue queue,
AbstractUsersManager abstractUsersManager,
long epoch,
ResourceUsage appResourceUsage,
RMContext rmContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptNodePartition(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey,
String nodePartition,
SchedulingMode schedulingMode) |
void |
addRequestedPartition(String partition) |
List<org.apache.hadoop.yarn.api.records.ResourceRequest> |
allocate(NodeType type,
SchedulerNode node,
org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey,
RMContainer containerAllocated) |
boolean |
canDelayTo(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey,
String resourceName)
Can delay to next?.
|
boolean |
checkAllocation(NodeType type,
SchedulerNode node,
org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey) |
void |
checkForDeactivation() |
void |
decPendingResource(String partition,
org.apache.hadoop.yarn.api.records.Resource toDecrease) |
List<org.apache.hadoop.yarn.api.records.ResourceRequest> |
getAllResourceRequests()
Used by REST API to fetch ResourceRequest
|
boolean |
getAndResetBlacklistChanged() |
org.apache.hadoop.yarn.api.records.ApplicationAttemptId |
getApplicationAttemptId() |
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId() |
Set<String> |
getBlackListCopy() |
long |
getNewContainerId() |
PendingAsk |
getNextPendingAsk() |
org.apache.hadoop.yarn.api.records.ResourceRequest |
getNextResourceRequest()
Method to return the next resource request to be serviced.
|
PendingAsk |
getPendingAsk(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey) |
PendingAsk |
getPendingAsk(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey,
String resourceName) |
String |
getQueueName() |
Set<String> |
getRequestedPartitions() |
RMContext |
getRMContext() |
Collection<org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey> |
getSchedulerKeys() |
<N extends SchedulerNode> |
getSchedulingPlacementSet(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerkey) |
ContainerUpdateContext |
getUpdateContext() |
String |
getUser() |
boolean |
isPending() |
boolean |
isPlaceBlacklisted(String resourceName,
boolean blacklistedBySystem)
Returns if the place (node/rack today) is either blacklisted by the
application (user) or the system.
|
void |
move(Queue newQueue) |
void |
recoverContainer(RMContainer rmContainer,
String partition) |
void |
removePlacementSets(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerRequestKey) |
void |
setQueue(Queue queue) |
void |
stop() |
void |
transferStateFromPreviousAppSchedulingInfo(AppSchedulingInfo appInfo) |
void |
updatePlacesBlacklistedByApp(List<String> blacklistAdditions,
List<String> blacklistRemovals)
The ApplicationMaster is updating the placesBlacklistedByApp used for
containers other than AMs.
|
void |
updatePlacesBlacklistedBySystem(List<String> blacklistAdditions,
List<String> blacklistRemovals)
Update the list of places that are blacklisted by the system.
|
boolean |
updateResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> requests,
boolean recoverPreemptedRequestForAContainer)
The ApplicationMaster is updating resource requirements for the
application, by asking for more resources and releasing resources acquired
by the application.
|
public final ContainerUpdateContext updateContext
public AppSchedulingInfo(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, String user, Queue queue, AbstractUsersManager abstractUsersManager, long epoch, ResourceUsage appResourceUsage, RMContext rmContext)
public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
public String getUser()
public long getNewContainerId()
public String getQueueName()
public boolean isPending()
public ContainerUpdateContext getUpdateContext()
public boolean updateResourceRequests(List<org.apache.hadoop.yarn.api.records.ResourceRequest> requests, boolean recoverPreemptedRequestForAContainer)
requests
- resources to be acquiredrecoverPreemptedRequestForAContainer
- recover ResourceRequest on preemptionpublic void removePlacementSets(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerRequestKey)
public void addRequestedPartition(String partition)
public void decPendingResource(String partition, org.apache.hadoop.yarn.api.records.Resource toDecrease)
public void updatePlacesBlacklistedByApp(List<String> blacklistAdditions, List<String> blacklistRemovals)
blacklistAdditions
- resources to be added to the userBlacklistblacklistRemovals
- resources to be removed from the userBlacklistpublic void updatePlacesBlacklistedBySystem(List<String> blacklistAdditions, List<String> blacklistRemovals)
blacklistAdditions
- resources to be added to placesBlacklistedBySystemblacklistRemovals
- resources to be removed from placesBlacklistedBySystempublic boolean getAndResetBlacklistChanged()
public Collection<org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey> getSchedulerKeys()
public List<org.apache.hadoop.yarn.api.records.ResourceRequest> getAllResourceRequests()
public PendingAsk getNextPendingAsk()
@InterfaceStability.Unstable public org.apache.hadoop.yarn.api.records.ResourceRequest getNextResourceRequest()
ResourceRequest
corresponding to the highest priority.ResourceRequest
to allocate resources for.public PendingAsk getPendingAsk(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey)
public PendingAsk getPendingAsk(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey, String resourceName)
public boolean isPlaceBlacklisted(String resourceName, boolean blacklistedBySystem)
resourceName
- the resourcenameblacklistedBySystem
- true if it should check amBlacklistpublic List<org.apache.hadoop.yarn.api.records.ResourceRequest> allocate(NodeType type, SchedulerNode node, org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey, RMContainer containerAllocated)
public void checkForDeactivation()
public void move(Queue newQueue)
public void stop()
public void setQueue(Queue queue)
public void transferStateFromPreviousAppSchedulingInfo(AppSchedulingInfo appInfo)
public void recoverContainer(RMContainer rmContainer, String partition)
public boolean checkAllocation(NodeType type, SchedulerNode node, org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey)
public <N extends SchedulerNode> SchedulingPlacementSet<N> getSchedulingPlacementSet(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerkey)
public boolean canDelayTo(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey, String resourceName)
schedulerKey
- schedulerKeyresourceName
- resourceNamepublic boolean acceptNodePartition(org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey schedulerKey, String nodePartition, SchedulingMode schedulingMode)
public RMContext getRMContext()
Copyright © 2020 Apache Software Foundation. All rights reserved.