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

All Known Implementing Classes:
AllocateRequestPBImpl

@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 unused containers being released by the ApplicationMaster
 void addAsk(ResourceRequest request)
           
 void addRelease(ContainerId container)
           
 void clearAsks()
           
 void clearReleases()
           
 ApplicationAttemptId getApplicationAttemptId()
          Get the ApplicationAttemptId being managed by the ApplicationMaster.
 ResourceRequest getAsk(int index)
           
 int getAskCount()
           
 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.
 ContainerId getRelease(int index)
           
 int getReleaseCount()
           
 List<ContainerId> getReleaseList()
          Get the list of ContainerId of unused containers being released by the ApplicationMaster.
 int getResponseId()
          Get the response id used to track duplicate responses.
 void removeAsk(int index)
           
 void removeRelease(int index)
           
 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

getAsk

@InterfaceAudience.Private
@InterfaceStability.Unstable
ResourceRequest getAsk(int index)

getAskCount

@InterfaceAudience.Private
@InterfaceStability.Unstable
int getAskCount()

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

addAsk

@InterfaceAudience.Private
@InterfaceStability.Unstable
void addAsk(ResourceRequest request)

removeAsk

@InterfaceAudience.Private
@InterfaceStability.Unstable
void removeAsk(int index)

clearAsks

@InterfaceAudience.Private
@InterfaceStability.Unstable
void clearAsks()

getReleaseList

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

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

getRelease

@InterfaceAudience.Private
@InterfaceStability.Unstable
ContainerId getRelease(int index)

getReleaseCount

@InterfaceAudience.Private
@InterfaceStability.Unstable
int getReleaseCount()

addAllReleases

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

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

addRelease

@InterfaceAudience.Private
@InterfaceStability.Unstable
void addRelease(ContainerId container)

removeRelease

@InterfaceAudience.Private
@InterfaceStability.Unstable
void removeRelease(int index)

clearReleases

@InterfaceAudience.Private
@InterfaceStability.Unstable
void clearReleases()


Copyright © 2012 Apache Software Foundation. All Rights Reserved.