Class RMContainerAllocator
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor
org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator
- All Implemented Interfaces:
Closeable,AutoCloseable,ContainerAllocator,RMHeartbeatHandler,org.apache.hadoop.service.Service,org.apache.hadoop.yarn.event.EventHandler<ContainerAllocatorEvent>
Allocates the container from the ResourceManager scheduler.
-
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.mapreduce.v2.app.rm.ContainerAllocator
ContainerAllocator.EventTypeNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatprotected BlockingQueue<ContainerAllocatorEvent>static final StringFields inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor
lastResponseID, pendingReleaseFields inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
allocatorThread, applicationACLs, applicationId, eventHandler, isSignalled, scheduler -
Constructor Summary
ConstructorsConstructorDescriptionRMContainerAllocator(ClientService clientService, AppContext context, AMPreemptionPolicy preemptionPolicy) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator.AssignedRequestscreateContainerFinishedEvent(org.apache.hadoop.yarn.api.records.ContainerStatus cont, org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptId) booleanorg.apache.hadoop.yarn.api.records.Resourcevoidhandle(ContainerAllocatorEvent event) protected voidprotected voidvoidrampDownReduces(int rampDown) voidrampUpReduces(int rampUp) voidvoidscheduleReduces(int totalMaps, int completedMaps, int scheduledMaps, int scheduledReduces, int assignedMaps, int assignedReduces, org.apache.hadoop.yarn.api.records.Resource mapResourceReqt, org.apache.hadoop.yarn.api.records.Resource reduceResourceReqt, int numPendingReduces, float maxReduceRampupLimit, float reduceSlowStart) protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidprotected voidvoidsetIsReduceStarted(boolean reduceStarted) Methods inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor
addContainerReq, addOpportunisticResourceRequest, addOutstandingRequestOnResync, computeIgnoreBlacklisting, containerFailedOnHost, decContainerReq, getAvailableResources, getBlacklistedNodes, getFilteredContainerRequest, isNodeBlacklisted, makeRemoteRequest, release, setRequestLimitMethods inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
createSchedulerProxy, doUnregistration, getApplicationProgress, getContext, getJob, getLastHeartbeatTime, getMaxContainerCapability, getSchedulerResourceTypes, isApplicationMasterRegistered, register, runOnNextHeartbeat, 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
-
DEFAULT_COMPLETED_MAPS_PERCENT_FOR_REDUCE_SLOWSTART
public static final float DEFAULT_COMPLETED_MAPS_PERCENT_FOR_REDUCE_SLOWSTART- See Also:
-
RAMPDOWN_DIAGNOSTIC
- See Also:
-
eventQueue
-
-
Constructor Details
-
RMContainerAllocator
public RMContainerAllocator(ClientService clientService, AppContext context, AMPreemptionPolicy preemptionPolicy)
-
-
Method Details
-
createAssignedRequests
protected org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator.AssignedRequests createAssignedRequests() -
serviceInit
- Overrides:
serviceInitin classRMContainerRequestor- Throws:
Exception
-
serviceStart
- Overrides:
serviceStartin classRMCommunicator- Throws:
Exception
-
heartbeat
- Specified by:
heartbeatin classRMCommunicator- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classRMCommunicator- Throws:
Exception
-
getIsReduceStarted
public boolean getIsReduceStarted() -
setIsReduceStarted
public void setIsReduceStarted(boolean reduceStarted) -
handle
- Specified by:
handlein interfaceorg.apache.hadoop.yarn.event.EventHandler<ContainerAllocatorEvent>
-
handleEvent
-
scheduleReduces
@Private public void scheduleReduces(int totalMaps, int completedMaps, int scheduledMaps, int scheduledReduces, int assignedMaps, int assignedReduces, org.apache.hadoop.yarn.api.records.Resource mapResourceReqt, org.apache.hadoop.yarn.api.records.Resource reduceResourceReqt, int numPendingReduces, float maxReduceRampupLimit, float reduceSlowStart) -
scheduleAllReduces
@Private public void scheduleAllReduces() -
rampUpReduces
@Private public void rampUpReduces(int rampUp) -
rampDownReduces
@Private public void rampDownReduces(int rampDown) -
createContainerFinishedEvent
@VisibleForTesting public TaskAttemptEvent createContainerFinishedEvent(org.apache.hadoop.yarn.api.records.ContainerStatus cont, org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptId) -
getResourceLimit
@Private public org.apache.hadoop.yarn.api.records.Resource getResourceLimit()
-