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


@InterfaceAudience.Public
@InterfaceStability.Stable
public interface AllocateRequest

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

The request includes:

See Also:
AMRMProtocol.allocate(AllocateRequest)

Method Summary
 void addAllAsks(List<ResourceRequest> resourceRequest)
          Add list of ResourceRequest to update the ResourceManager about the application's resource requirements.
 void addAllReleases(List<ContainerId> releaseContainers)
          Add the list of ContainerId of containers being released by the ApplicationMaster
 ApplicationAttemptId getApplicationAttemptId()
          Get the ApplicationAttemptId being managed by the ApplicationMaster.
 List<ResourceRequest> getAskList()
          Get the list of ResourceRequest to update the ResourceManager about the application's resource requirements.
 float getProgress()
          Get the current progress of application.
 List<ContainerId> getReleaseList()
          Get the list of ContainerId of containers being released by the ApplicationMaster.
 int getResponseId()
          Get the response id used to track duplicate responses.
 void setApplicationAttemptId(ApplicationAttemptId applicationAttemptId)
          Set the ApplicationAttemptId being managed by the ApplicationMaster.
 void setProgress(float progress)
          Set the current progress of application
 void setResponseId(int id)
          Set the response id used to track duplicate responses.
 

Method Detail

getApplicationAttemptId

@InterfaceAudience.Public
@InterfaceStability.Stable
ApplicationAttemptId getApplicationAttemptId()
Get the ApplicationAttemptId being managed by the ApplicationMaster.

Returns:
ApplicationAttemptId being managed by the ApplicationMaster

setApplicationAttemptId

@InterfaceAudience.Public
@InterfaceStability.Stable
void setApplicationAttemptId(ApplicationAttemptId applicationAttemptId)
Set the ApplicationAttemptId being managed by the ApplicationMaster.

Parameters:
applicationAttemptId - ApplicationAttemptId being managed by the ApplicationMaster

getResponseId

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

Returns:
response id

setResponseId

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

Parameters:
id - response id

getProgress

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

Returns:
current progress of application

setProgress

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

Parameters:
progress - current progress of application

getAskList

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

Returns:
the list of ResourceRequest

addAllAsks

@InterfaceAudience.Public
@InterfaceStability.Stable
void addAllAsks(List<ResourceRequest> resourceRequest)
Add list of ResourceRequest to update the ResourceManager about the application's resource requirements.

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

getReleaseList

@InterfaceAudience.Public
@InterfaceStability.Stable
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

addAllReleases

@InterfaceAudience.Public
@InterfaceStability.Stable
void addAllReleases(List<ContainerId> releaseContainers)
Add the list of ContainerId of containers being released by the ApplicationMaster

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


Copyright © 2012 Apache Software Foundation. All Rights Reserved.