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


@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.
 

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

getResponseId

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

Returns:
last response id

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

getCompletedContainersStatuses

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

Returns:
the list of completed containers' statuses


Copyright © 2013 Apache Software Foundation. All Rights Reserved.