org.apache.hadoop.yarn.api.records
Interface AMResponse

All Known Implementing Classes:
AMResponsePBImpl

@InterfaceAudience.Public
@InterfaceStability.Unstable
public interface AMResponse

The response sent by the ResourceManager the ApplicationMaster during resource negotiation.

The response includes:

See Also:
AMRMProtocol.allocate(AllocateRequest)

Method Summary
 List<Container> getAllocatedContainers()
          Get the list of newly allocated Container by the ResourceManager.
 Resource getAvailableResources()
          Get the available headroom for resources in the cluster for the application.
 List<ContainerStatus> getCompletedContainersStatuses()
          Get the list of completed containers' statuses.
 boolean getReboot()
          Should the ApplicationMaster reboot for being horribly out-of-sync with the ResourceManager as deigned by getResponseId()?
 int getResponseId()
          Get the last response id.
 void setAllocatedContainers(List<Container> containers)
          Set the list of newly allocated Container by the ResourceManager.
 void setAvailableResources(Resource limit)
           
 void setCompletedContainersStatuses(List<ContainerStatus> containers)
           
 void setReboot(boolean reboot)
           
 void setResponseId(int responseId)
           
 

Method Detail

getReboot

@InterfaceAudience.Public
@InterfaceStability.Stable
boolean getReboot()
Should the ApplicationMaster reboot for being horribly out-of-sync with the ResourceManager as deigned by getResponseId()?

Returns:
true if the ApplicationMaster should reboot, false otherwise

setReboot

@InterfaceAudience.Private
@InterfaceStability.Unstable
void setReboot(boolean reboot)

getResponseId

@InterfaceAudience.Public
@InterfaceStability.Stable
int getResponseId()
Get the last response id.

Returns:
last response id

setResponseId

@InterfaceAudience.Private
@InterfaceStability.Unstable
void setResponseId(int responseId)

getAllocatedContainers

@InterfaceAudience.Public
@InterfaceStability.Stable
List<Container> getAllocatedContainers()
Get the list of newly allocated Container by the ResourceManager.

Returns:
list of newly allocated Container

setAllocatedContainers

@InterfaceAudience.Public
@InterfaceStability.Stable
void setAllocatedContainers(List<Container> containers)
Set the list of newly allocated Container by the ResourceManager.

Parameters:
containers - list of newly allocated Container

getAvailableResources

@InterfaceAudience.Public
@InterfaceStability.Stable
Resource getAvailableResources()
Get the available headroom for resources in the cluster for the application.

Returns:
limit of available headroom for resources in the cluster for the application

setAvailableResources

@InterfaceAudience.Private
@InterfaceStability.Unstable
void setAvailableResources(Resource limit)

getCompletedContainersStatuses

@InterfaceAudience.Public
@InterfaceStability.Stable
List<ContainerStatus> getCompletedContainersStatuses()
Get the list of completed containers' statuses.

Returns:
the list of completed containers' statuses

setCompletedContainersStatuses

@InterfaceAudience.Private
@InterfaceStability.Unstable
void setCompletedContainersStatuses(List<ContainerStatus> containers)


Copyright © 2012 Apache Software Foundation. All Rights Reserved.