@InterfaceAudience.Private @InterfaceStability.Unstable public class AllocateResponsePBImpl extends AllocateResponse
| Constructor and Description |
|---|
AllocateResponsePBImpl() |
AllocateResponsePBImpl(YarnServiceProtos.AllocateResponseProto proto) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
List<Container> |
getAllocatedContainers()
Get the list of newly allocated
Container by the
ResourceManager. |
AMCommand |
getAMCommand()
If the
ResourceManager needs the
ApplicationMaster to take some action then it will send an
AMCommand to the ApplicationMaster. |
Resource |
getAvailableResources()
Get the available headroom for resources in the cluster for the
application.
|
List<ContainerStatus> |
getCompletedContainersStatuses()
Get the list of completed containers' statuses.
|
List<NMToken> |
getNMTokens()
Get the list of NMTokens required for communicating with NM.
|
int |
getNumClusterNodes()
Get the number of hosts available on the cluster.
|
PreemptionMessage |
getPreemptionMessage()
Get the description of containers owned by the AM, but requested back by
the cluster.
|
YarnServiceProtos.AllocateResponseProto |
getProto() |
int |
getResponseId()
Get the last response id.
|
List<NodeReport> |
getUpdatedNodes()
Get the list of updated
NodeReports. |
int |
hashCode() |
void |
setAllocatedContainers(List<Container> containers)
Set the list of newly allocated
Container by the
ResourceManager. |
void |
setAMCommand(AMCommand command) |
void |
setAvailableResources(Resource limit) |
void |
setCompletedContainersStatuses(List<ContainerStatus> containers) |
void |
setNMTokens(List<NMToken> nmTokens) |
void |
setNumClusterNodes(int numNodes) |
void |
setPreemptionMessage(PreemptionMessage preempt) |
void |
setResponseId(int responseId) |
void |
setUpdatedNodes(List<NodeReport> updatedNodes) |
String |
toString() |
newInstancepublic AllocateResponsePBImpl()
public AllocateResponsePBImpl(YarnServiceProtos.AllocateResponseProto proto)
public YarnServiceProtos.AllocateResponseProto getProto()
public AMCommand getAMCommand()
AllocateResponseResourceManager 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.getAMCommand in class AllocateResponseAMCommand if the ApplicationMaster should
take action, null otherwiseAMCommandpublic void setAMCommand(AMCommand command)
setAMCommand in class AllocateResponsepublic int getResponseId()
AllocateResponsegetResponseId in class AllocateResponsepublic void setResponseId(int responseId)
setResponseId in class AllocateResponsepublic Resource getAvailableResources()
AllocateResponsegetAvailableResources in class AllocateResponsepublic void setAvailableResources(Resource limit)
setAvailableResources in class AllocateResponsepublic List<NodeReport> getUpdatedNodes()
AllocateResponseNodeReports. Updates could
be changes in health, availability etc of the nodes.getUpdatedNodes in class AllocateResponsepublic void setUpdatedNodes(List<NodeReport> updatedNodes)
setUpdatedNodes in class AllocateResponsepublic List<Container> getAllocatedContainers()
AllocateResponseContainer by the
ResourceManager.getAllocatedContainers in class AllocateResponseContainerpublic void setAllocatedContainers(List<Container> containers)
AllocateResponseContainer by the
ResourceManager.setAllocatedContainers in class AllocateResponsecontainers - list of newly allocated Containerpublic List<ContainerStatus> getCompletedContainersStatuses()
AllocateResponsegetCompletedContainersStatuses in class AllocateResponsepublic void setCompletedContainersStatuses(List<ContainerStatus> containers)
setCompletedContainersStatuses in class AllocateResponsepublic void setNMTokens(List<NMToken> nmTokens)
setNMTokens in class AllocateResponsepublic List<NMToken> getNMTokens()
AllocateResponseGet the list of NMTokens required for communicating with NM. New NMTokens issued only if
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.
getNMTokens in class AllocateResponsepublic int getNumClusterNodes()
AllocateResponsegetNumClusterNodes in class AllocateResponsepublic void setNumClusterNodes(int numNodes)
setNumClusterNodes in class AllocateResponsepublic PreemptionMessage getPreemptionMessage()
AllocateResponseGet the description of containers owned by the AM, but requested back by the cluster. Note that the RM may have an inconsistent view of the resources owned by the AM. These messages are advisory, and the AM may elect to ignore them.
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.
getPreemptionMessage in class AllocateResponsepublic void setPreemptionMessage(PreemptionMessage preempt)
setPreemptionMessage in class AllocateResponseCopyright © 2013 Apache Software Foundation. All rights reserved.