org.apache.hadoop.yarn.api.records.impl.pb
Class AMResponsePBImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.ProtoBase<YarnProtos.AMResponseProto>
      extended by org.apache.hadoop.yarn.api.records.impl.pb.AMResponsePBImpl
All Implemented Interfaces:
AMResponse

public class AMResponsePBImpl
extends ProtoBase<YarnProtos.AMResponseProto>
implements AMResponse


Constructor Summary
AMResponsePBImpl()
           
AMResponsePBImpl(YarnProtos.AMResponseProto proto)
           
 
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.
 YarnProtos.AMResponseProto getProto()
           
 boolean getReboot()
          Should the ApplicationMaster reboot for being horribly out-of-sync with the ResourceManager as deigned by AMResponse.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)
           
 
Methods inherited from class org.apache.hadoop.yarn.api.records.ProtoBase
convertFromProtoFormat, convertToProtoFormat, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AMResponsePBImpl

public AMResponsePBImpl()

AMResponsePBImpl

public AMResponsePBImpl(YarnProtos.AMResponseProto proto)
Method Detail

getProto

public YarnProtos.AMResponseProto getProto()
Specified by:
getProto in class ProtoBase<YarnProtos.AMResponseProto>

getReboot

public boolean getReboot()
Description copied from interface: AMResponse
Should the ApplicationMaster reboot for being horribly out-of-sync with the ResourceManager as deigned by AMResponse.getResponseId()?

Specified by:
getReboot in interface AMResponse
Returns:
true if the ApplicationMaster should reboot, false otherwise

setReboot

public void setReboot(boolean reboot)
Specified by:
setReboot in interface AMResponse

getResponseId

public int getResponseId()
Description copied from interface: AMResponse
Get the last response id.

Specified by:
getResponseId in interface AMResponse
Returns:
last response id

setResponseId

public void setResponseId(int responseId)
Specified by:
setResponseId in interface AMResponse

getAvailableResources

public Resource getAvailableResources()
Description copied from interface: AMResponse
Get the available headroom for resources in the cluster for the application.

Specified by:
getAvailableResources in interface AMResponse
Returns:
limit of available headroom for resources in the cluster for the application

setAvailableResources

public void setAvailableResources(Resource limit)
Specified by:
setAvailableResources in interface AMResponse

getAllocatedContainers

public List<Container> getAllocatedContainers()
Description copied from interface: AMResponse
Get the list of newly allocated Container by the ResourceManager.

Specified by:
getAllocatedContainers in interface AMResponse
Returns:
list of newly allocated Container

setAllocatedContainers

public void setAllocatedContainers(List<Container> containers)
Description copied from interface: AMResponse
Set the list of newly allocated Container by the ResourceManager.

Specified by:
setAllocatedContainers in interface AMResponse
Parameters:
containers - list of newly allocated Container

getCompletedContainersStatuses

public List<ContainerStatus> getCompletedContainersStatuses()
Description copied from interface: AMResponse
Get the list of completed containers' statuses.

Specified by:
getCompletedContainersStatuses in interface AMResponse
Returns:
the list of completed containers' statuses

setCompletedContainersStatuses

public void setCompletedContainersStatuses(List<ContainerStatus> containers)
Specified by:
setCompletedContainersStatuses in interface AMResponse


Copyright © 2012 Apache Software Foundation. All Rights Reserved.