org.apache.hadoop.yarn.api.protocolrecords
Class AllocateRequest

java.lang.Object
  extended by org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class AllocateRequest
extends Object

The core request sent by the ApplicationMaster to the ResourceManager to obtain resources in the cluster.

The request includes:

See Also:
ApplicationMasterProtocol.allocate(AllocateRequest)

Constructor Summary
AllocateRequest()
           
 
Method Summary
abstract  List<ResourceRequest> getAskList()
          Get the list of ResourceRequest to update the ResourceManager about the application's resource requirements.
abstract  List<ContainerResourceIncreaseRequest> getIncreaseRequests()
          Get the ContainerResourceIncreaseRequest being sent by the ApplicationMaster
abstract  float getProgress()
          Get the current progress of application.
abstract  List<ContainerId> getReleaseList()
          Get the list of ContainerId of containers being released by the ApplicationMaster.
abstract  ResourceBlacklistRequest getResourceBlacklistRequest()
          Get the ResourceBlacklistRequest being sent by the ApplicationMaster.
abstract  int getResponseId()
          Get the response id used to track duplicate responses.
static AllocateRequest newInstance(int responseID, float appProgress, List<ResourceRequest> resourceAsk, List<ContainerId> containersToBeReleased, ResourceBlacklistRequest resourceBlacklistRequest)
           
static AllocateRequest newInstance(int responseID, float appProgress, List<ResourceRequest> resourceAsk, List<ContainerId> containersToBeReleased, ResourceBlacklistRequest resourceBlacklistRequest, List<ContainerResourceIncreaseRequest> increaseRequests)
           
abstract  void setAskList(List<ResourceRequest> resourceRequests)
          Set list of ResourceRequest to update the ResourceManager about the application's resource requirements.
abstract  void setIncreaseRequests(List<ContainerResourceIncreaseRequest> increaseRequests)
          Set the ContainerResourceIncreaseRequest to inform the ResourceManager about some container's resources need to be increased
abstract  void setProgress(float progress)
          Set the current progress of application
abstract  void setReleaseList(List<ContainerId> releaseContainers)
          Set the list of ContainerId of containers being released by the ApplicationMaster
abstract  void setResourceBlacklistRequest(ResourceBlacklistRequest resourceBlacklistRequest)
          Set the ResourceBlacklistRequest to inform the ResourceManager about the blacklist additions and removals per the ApplicationMaster.
abstract  void setResponseId(int id)
          Set the response id used to track duplicate responses.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllocateRequest

public AllocateRequest()
Method Detail

newInstance

@InterfaceAudience.Public
@InterfaceStability.Stable
public static AllocateRequest newInstance(int responseID,
                                                                                             float appProgress,
                                                                                             List<ResourceRequest> resourceAsk,
                                                                                             List<ContainerId> containersToBeReleased,
                                                                                             ResourceBlacklistRequest resourceBlacklistRequest)

newInstance

@InterfaceAudience.Public
@InterfaceStability.Stable
public static AllocateRequest newInstance(int responseID,
                                                                                             float appProgress,
                                                                                             List<ResourceRequest> resourceAsk,
                                                                                             List<ContainerId> containersToBeReleased,
                                                                                             ResourceBlacklistRequest resourceBlacklistRequest,
                                                                                             List<ContainerResourceIncreaseRequest> increaseRequests)

getResponseId

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract int getResponseId()
Get the response id used to track duplicate responses.

Returns:
response id

setResponseId

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract void setResponseId(int id)
Set the response id used to track duplicate responses.

Parameters:
id - response id

getProgress

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract float getProgress()
Get the current progress of application.

Returns:
current progress of application

setProgress

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract void setProgress(float progress)
Set the current progress of application

Parameters:
progress - current progress of application

getAskList

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract List<ResourceRequest> getAskList()
Get the list of ResourceRequest to update the ResourceManager about the application's resource requirements.

Returns:
the list of ResourceRequest
See Also:
ResourceRequest

setAskList

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract void setAskList(List<ResourceRequest> resourceRequests)
Set list of ResourceRequest to update the ResourceManager about the application's resource requirements.

Parameters:
resourceRequests - list of ResourceRequest to update the ResourceManager about the application's resource requirements
See Also:
ResourceRequest

getReleaseList

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract List<ContainerId> getReleaseList()
Get the list of ContainerId of containers being released by the ApplicationMaster.

Returns:
list of ContainerId of containers being released by the ApplicationMaster

setReleaseList

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract void setReleaseList(List<ContainerId> releaseContainers)
Set the list of ContainerId of containers being released by the ApplicationMaster

Parameters:
releaseContainers - list of ContainerId of containers being released by the ApplicationMaster

getResourceBlacklistRequest

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract ResourceBlacklistRequest getResourceBlacklistRequest()
Get the ResourceBlacklistRequest being sent by the ApplicationMaster.

Returns:
the ResourceBlacklistRequest being sent by the ApplicationMaster
See Also:
ResourceBlacklistRequest

setResourceBlacklistRequest

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract void setResourceBlacklistRequest(ResourceBlacklistRequest resourceBlacklistRequest)
Set the ResourceBlacklistRequest to inform the ResourceManager about the blacklist additions and removals per the ApplicationMaster.

Parameters:
resourceBlacklistRequest - the ResourceBlacklistRequest to inform the ResourceManager about the blacklist additions and removals per the ApplicationMaster
See Also:
ResourceBlacklistRequest

getIncreaseRequests

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract List<ContainerResourceIncreaseRequest> getIncreaseRequests()
Get the ContainerResourceIncreaseRequest being sent by the ApplicationMaster


setIncreaseRequests

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract void setIncreaseRequests(List<ContainerResourceIncreaseRequest> increaseRequests)
Set the ContainerResourceIncreaseRequest to inform the ResourceManager about some container's resources need to be increased



Copyright © 2014 Apache Software Foundation. All Rights Reserved.