Class RMContainerRequestor
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor
- All Implemented Interfaces:
Closeable,AutoCloseable,RMHeartbeatHandler,org.apache.hadoop.service.Service
- Direct Known Subclasses:
RMContainerAllocator
Keeps the data structures to send container requests to RM.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
RMCommunicator.AllocatorRunnableNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected Set<org.apache.hadoop.yarn.api.records.ContainerId>Fields inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
allocatorThread, applicationACLs, applicationId, eventHandler, isSignalled, scheduler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddContainerReq(org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor.ContainerRequest req) protected voidaddOpportunisticResourceRequest(org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.Resource capability) protected voidprotected voidprotected voidcontainerFailedOnHost(String hostName) protected voiddecContainerReq(org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor.ContainerRequest req) protected org.apache.hadoop.yarn.api.records.Resourceprotected org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor.ContainerRequestgetFilteredContainerRequest(org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor.ContainerRequest orig) protected booleanisNodeBlacklisted(String hostname) protected org.apache.hadoop.yarn.api.protocolrecords.AllocateResponseprotected voidrelease(org.apache.hadoop.yarn.api.records.ContainerId containerId) protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidsetRequestLimit(org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.Resource capability, int limit) Methods inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
createSchedulerProxy, doUnregistration, getApplicationProgress, getContext, getJob, getLastHeartbeatTime, getMaxContainerCapability, getSchedulerResourceTypes, heartbeat, isApplicationMasterRegistered, register, runOnNextHeartbeat, serviceStart, serviceStop, setShouldUnregister, setSignalled, startAllocatorThread, unregisterMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Field Details
-
lastResponseID
protected int lastResponseID -
pendingRelease
-
-
Constructor Details
-
RMContainerRequestor
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classRMCommunicator- Throws:
Exception
-
makeRemoteRequest
protected org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse makeRemoteRequest() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
addOutstandingRequestOnResync
protected void addOutstandingRequestOnResync() -
computeIgnoreBlacklisting
protected void computeIgnoreBlacklisting() -
containerFailedOnHost
-
getAvailableResources
protected org.apache.hadoop.yarn.api.records.Resource getAvailableResources() -
addContainerReq
protected void addContainerReq(org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor.ContainerRequest req) -
decContainerReq
protected void decContainerReq(org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor.ContainerRequest req) -
addOpportunisticResourceRequest
protected void addOpportunisticResourceRequest(org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.Resource capability) -
release
protected void release(org.apache.hadoop.yarn.api.records.ContainerId containerId) -
isNodeBlacklisted
-
getFilteredContainerRequest
protected org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor.ContainerRequest getFilteredContainerRequest(org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor.ContainerRequest orig) -
setRequestLimit
protected void setRequestLimit(org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.Resource capability, int limit) -
getBlacklistedNodes
-