@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
NodeReport s. |
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() |
newInstance
public AllocateResponsePBImpl()
public AllocateResponsePBImpl(YarnServiceProtos.AllocateResponseProto proto)
public YarnServiceProtos.AllocateResponseProto getProto()
public AMCommand getAMCommand()
AllocateResponse
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.getAMCommand
in class AllocateResponse
AMCommand
if the ApplicationMaster
should
take action, null
otherwiseAMCommand
public void setAMCommand(AMCommand command)
setAMCommand
in class AllocateResponse
public int getResponseId()
AllocateResponse
getResponseId
in class AllocateResponse
public void setResponseId(int responseId)
setResponseId
in class AllocateResponse
public Resource getAvailableResources()
AllocateResponse
getAvailableResources
in class AllocateResponse
public void setAvailableResources(Resource limit)
setAvailableResources
in class AllocateResponse
public List<NodeReport> getUpdatedNodes()
AllocateResponse
NodeReport
s. Updates could
be changes in health, availability etc of the nodes.getUpdatedNodes
in class AllocateResponse
public void setUpdatedNodes(List<NodeReport> updatedNodes)
setUpdatedNodes
in class AllocateResponse
public List<Container> getAllocatedContainers()
AllocateResponse
Container
by the
ResourceManager
.getAllocatedContainers
in class AllocateResponse
Container
public void setAllocatedContainers(List<Container> containers)
AllocateResponse
Container
by the
ResourceManager
.setAllocatedContainers
in class AllocateResponse
containers
- list of newly allocated Container
public List<ContainerStatus> getCompletedContainersStatuses()
AllocateResponse
getCompletedContainersStatuses
in class AllocateResponse
public void setCompletedContainersStatuses(List<ContainerStatus> containers)
setCompletedContainersStatuses
in class AllocateResponse
public void setNMTokens(List<NMToken> nmTokens)
setNMTokens
in class AllocateResponse
public List<NMToken> getNMTokens()
AllocateResponse
Get 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 AllocateResponse
public int getNumClusterNodes()
AllocateResponse
getNumClusterNodes
in class AllocateResponse
public void setNumClusterNodes(int numNodes)
setNumClusterNodes
in class AllocateResponse
public PreemptionMessage getPreemptionMessage()
AllocateResponse
Get 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 AllocateResponse
public void setPreemptionMessage(PreemptionMessage preempt)
setPreemptionMessage
in class AllocateResponse
Copyright © 2013 Apache Software Foundation. All rights reserved.