org.apache.hadoop.yarn.api.protocolrecords.impl.pb
Class AllocateRequestPBImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.ProtoBase<YarnServiceProtos.AllocateRequestProto>
      extended by org.apache.hadoop.yarn.api.protocolrecords.impl.pb.AllocateRequestPBImpl
All Implemented Interfaces:
AllocateRequest

public class AllocateRequestPBImpl
extends ProtoBase<YarnServiceProtos.AllocateRequestProto>
implements AllocateRequest


Constructor Summary
AllocateRequestPBImpl()
           
AllocateRequestPBImpl(YarnServiceProtos.AllocateRequestProto proto)
           
 
Method Summary
 void addAllAsks(List<ResourceRequest> ask)
          Add list of ResourceRequest to update the ResourceManager about the application's resource requirements.
 void addAllReleases(List<ContainerId> release)
          Add the list of ContainerId of unused containers being released by the ApplicationMaster
 void addAsk(ResourceRequest ask)
           
 void addRelease(ContainerId release)
           
 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.
 YarnServiceProtos.AllocateRequestProto getProto()
           
 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 appAttemptId)
          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.
 
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

AllocateRequestPBImpl

public AllocateRequestPBImpl()

AllocateRequestPBImpl

public AllocateRequestPBImpl(YarnServiceProtos.AllocateRequestProto proto)
Method Detail

getProto

public YarnServiceProtos.AllocateRequestProto getProto()
Specified by:
getProto in class ProtoBase<YarnServiceProtos.AllocateRequestProto>

getApplicationAttemptId

public ApplicationAttemptId getApplicationAttemptId()
Description copied from interface: AllocateRequest
Get the ApplicationAttemptId being managed by the ApplicationMaster.

Specified by:
getApplicationAttemptId in interface AllocateRequest
Returns:
ApplicationAttemptId being managed by the ApplicationMaster

setApplicationAttemptId

public void setApplicationAttemptId(ApplicationAttemptId appAttemptId)
Description copied from interface: AllocateRequest
Set the ApplicationAttemptId being managed by the ApplicationMaster.

Specified by:
setApplicationAttemptId in interface AllocateRequest
Parameters:
appAttemptId - ApplicationAttemptId being managed by the ApplicationMaster

getResponseId

public int getResponseId()
Description copied from interface: AllocateRequest
Get the response id used to track duplicate responses.

Specified by:
getResponseId in interface AllocateRequest
Returns:
response id

setResponseId

public void setResponseId(int id)
Description copied from interface: AllocateRequest
Set the response id used to track duplicate responses.

Specified by:
setResponseId in interface AllocateRequest
Parameters:
id - response id

getProgress

public float getProgress()
Description copied from interface: AllocateRequest
Get the current progress of application.

Specified by:
getProgress in interface AllocateRequest
Returns:
current progress of application

setProgress

public void setProgress(float progress)
Description copied from interface: AllocateRequest
Set the current progress of application

Specified by:
setProgress in interface AllocateRequest
Parameters:
progress - current progress of application

getAskList

public List<ResourceRequest> getAskList()
Description copied from interface: AllocateRequest
Get the list of ResourceRequest to update the ResourceManager about the application's resource requirements.

Specified by:
getAskList in interface AllocateRequest
Returns:
the list of ResourceRequest

getAsk

public ResourceRequest getAsk(int index)
Specified by:
getAsk in interface AllocateRequest

getAskCount

public int getAskCount()
Specified by:
getAskCount in interface AllocateRequest

addAllAsks

public void addAllAsks(List<ResourceRequest> ask)
Description copied from interface: AllocateRequest
Add list of ResourceRequest to update the ResourceManager about the application's resource requirements.

Specified by:
addAllAsks in interface AllocateRequest
Parameters:
ask - list of ResourceRequest to update the ResourceManager about the application's resource requirements

addAsk

public void addAsk(ResourceRequest ask)
Specified by:
addAsk in interface AllocateRequest

removeAsk

public void removeAsk(int index)
Specified by:
removeAsk in interface AllocateRequest

clearAsks

public void clearAsks()
Specified by:
clearAsks in interface AllocateRequest

getReleaseList

public List<ContainerId> getReleaseList()
Description copied from interface: AllocateRequest
Get the list of ContainerId of unused containers being released by the ApplicationMaster.

Specified by:
getReleaseList in interface AllocateRequest
Returns:
list of ContainerId of unused containers being released by the ApplicationMaster

getRelease

public ContainerId getRelease(int index)
Specified by:
getRelease in interface AllocateRequest

getReleaseCount

public int getReleaseCount()
Specified by:
getReleaseCount in interface AllocateRequest

addAllReleases

public void addAllReleases(List<ContainerId> release)
Description copied from interface: AllocateRequest
Add the list of ContainerId of unused containers being released by the ApplicationMaster

Specified by:
addAllReleases in interface AllocateRequest
Parameters:
release - list of ContainerId of unused containers being released by the < code>ApplicationMaster

addRelease

public void addRelease(ContainerId release)
Specified by:
addRelease in interface AllocateRequest

removeRelease

public void removeRelease(int index)
Specified by:
removeRelease in interface AllocateRequest

clearReleases

public void clearReleases()
Specified by:
clearReleases in interface AllocateRequest


Copyright © 2012 Apache Software Foundation. All Rights Reserved.