@InterfaceAudience.Public @InterfaceStability.Stable public abstract class AllocateResponse extends Object
ResourceManager
the
ApplicationMaster
during resource negotiation.
The response, includes:
ApplicationMaster
take some actions (resync, shutdown etc.).
Container
.Container
s' statuses.Container
representing the containers
whose resource has been increased.
Container
representing the containers
whose resource has been decreased.
Constructor and Description |
---|
AllocateResponse() |
Modifier and Type | Method and Description |
---|---|
abstract List<Container> |
getAllocatedContainers()
Get the list of newly allocated
Container by the
ResourceManager . |
abstract AMCommand |
getAMCommand()
If the
ResourceManager needs the
ApplicationMaster to take some action then it will send an
AMCommand to the ApplicationMaster . |
abstract Token |
getAMRMToken()
The AMRMToken that belong to this attempt
|
abstract Priority |
getApplicationPriority()
Priority of the application
|
abstract Resource |
getAvailableResources()
Get the available headroom for resources in the cluster for the
application.
|
abstract CollectorInfo |
getCollectorInfo()
The data associated with the collector that belongs to this app.
|
abstract List<ContainerStatus> |
getCompletedContainersStatuses()
Get the list of completed containers' statuses.
|
abstract List<Container> |
getContainersFromPreviousAttempts()
Get the list of running containers as viewed by
ResourceManager from previous application attempts which
have not been reported to the Application Master yet. |
abstract org.apache.hadoop.yarn.api.records.EnhancedHeadroom |
getEnhancedHeadroom() |
abstract List<NMToken> |
getNMTokens()
Get the list of NMTokens required for communicating with NM.
|
abstract int |
getNumClusterNodes()
Get the number of hosts available on the cluster.
|
abstract PreemptionMessage |
getPreemptionMessage()
Get the description of containers owned by the AM, but requested back by
the cluster.
|
List<RejectedSchedulingRequest> |
getRejectedSchedulingRequests()
Get a list of all SchedulingRequests that the RM has rejected between
this allocate call and the previous one.
|
abstract int |
getResponseId()
Get the last response id.
|
abstract List<UpdatedContainer> |
getUpdatedContainers()
Get the list of newly updated containers by
ResourceManager . |
abstract List<NodeReport> |
getUpdatedNodes()
Get the list of updated
NodeReport s. |
List<UpdateContainerError> |
getUpdateErrors()
Get the list of container update errors to inform the
Application Master about the container updates that could not be
satisfied due to error.
|
static AllocateResponse |
newInstance(int responseId,
List<ContainerStatus> completedContainers,
List<Container> allocatedContainers,
List<NodeReport> updatedNodes,
Resource availResources,
AMCommand command,
int numClusterNodes,
PreemptionMessage preempt,
List<NMToken> nmTokens) |
static AllocateResponse |
newInstance(int responseId,
List<ContainerStatus> completedContainers,
List<Container> allocatedContainers,
List<NodeReport> updatedNodes,
Resource availResources,
AMCommand command,
int numClusterNodes,
PreemptionMessage preempt,
List<NMToken> nmTokens,
Token amRMToken,
List<UpdatedContainer> updatedContainers,
CollectorInfo collectorInfo) |
void |
setUpdateErrors(List<UpdateContainerError> updateErrors)
Set the list of container update errors to inform the
Application Master about the container updates that could not be
satisfied due to error.
|
@InterfaceAudience.Public @InterfaceStability.Stable public static AllocateResponse newInstance(int responseId, List<ContainerStatus> completedContainers, List<Container> allocatedContainers, List<NodeReport> updatedNodes, Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage preempt, List<NMToken> nmTokens)
@InterfaceAudience.Public @InterfaceStability.Unstable public static AllocateResponse newInstance(int responseId, List<ContainerStatus> completedContainers, List<Container> allocatedContainers, List<NodeReport> updatedNodes, Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage preempt, List<NMToken> nmTokens, Token amRMToken, List<UpdatedContainer> updatedContainers, CollectorInfo collectorInfo)
@InterfaceAudience.Public @InterfaceStability.Stable public abstract AMCommand getAMCommand()
ResourceManager
needs the
ApplicationMaster
to take some action then it will send an
AMCommand to the ApplicationMaster
. See AMCommand
for details on commands and actions for them.AMCommand
if the ApplicationMaster
should
take action, null
otherwiseAMCommand
@InterfaceAudience.Public @InterfaceStability.Stable public abstract int getResponseId()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract List<Container> getAllocatedContainers()
Container
by the
ResourceManager
.Container
@InterfaceAudience.Public @InterfaceStability.Stable public abstract Resource getAvailableResources()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract List<ContainerStatus> getCompletedContainersStatuses()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract List<NodeReport> getUpdatedNodes()
NodeReport
s. Updates could
be changes in health, availability etc of the nodes.@InterfaceAudience.Public @InterfaceStability.Stable public abstract int getNumClusterNodes()
@InterfaceAudience.Public @InterfaceStability.Evolving public abstract PreemptionMessage getPreemptionMessage()
The message is a snapshot of the resources the RM wants back from the AM. While demand persists, the RM will repeat its request; applications should not interpret each message as a request for additional resources on top of previous messages. Resources requested consistently over some duration may be forcibly killed by the RM.
@InterfaceAudience.Public @InterfaceStability.Stable public abstract List<NMToken> getNMTokens()
1) AM is receiving first container on underlying NodeManager.
OR
2) NMToken master key rolled over in ResourceManager and AM is getting new
container on the same underlying NodeManager.
AM will receive one NMToken per NM irrespective of the number of containers issued on same NM. AM is expected to store these tokens until issued a new token for the same NM.
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract List<UpdatedContainer> getUpdatedContainers()
ResourceManager
.@InterfaceAudience.Public @InterfaceStability.Unstable public abstract Token getAMRMToken()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract Priority getApplicationPriority()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract CollectorInfo getCollectorInfo()
@InterfaceAudience.Public @InterfaceStability.Unstable public List<UpdateContainerError> getUpdateErrors()
@InterfaceAudience.Public @InterfaceStability.Unstable public void setUpdateErrors(List<UpdateContainerError> updateErrors)
updateErrors
- list of UpdateContainerError
for
containers updates requests that were in error@InterfaceAudience.Public @InterfaceStability.Unstable public abstract List<Container> getContainersFromPreviousAttempts()
ResourceManager
from previous application attempts which
have not been reported to the Application Master yet.
ResourceManager
from previous application attempts.@InterfaceAudience.Public @InterfaceStability.Unstable public List<RejectedSchedulingRequest> getRejectedSchedulingRequests()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract org.apache.hadoop.yarn.api.records.EnhancedHeadroom getEnhancedHeadroom()
Copyright © 2024 Apache Software Foundation. All rights reserved.