public class RMContainerAllocator extends RMContainerRequestor implements ContainerAllocator
ContainerAllocator.EventType
Service.STATE
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_COMPLETED_MAPS_PERCENT_FOR_REDUCE_SLOWSTART |
allocatorThread, applicationACLs, applicationId, eventHandler, isSignalled, scheduler
Constructor and Description |
---|
RMContainerAllocator(ClientService clientService,
AppContext context) |
Modifier and Type | Method and Description |
---|---|
TaskAttemptEvent |
createContainerFinishedEvent(ContainerStatus cont,
TaskAttemptId attemptID) |
boolean |
getIsReduceStarted() |
int |
getMemLimit() |
void |
handle(ContainerAllocatorEvent event) |
protected void |
handleEvent(ContainerAllocatorEvent event) |
protected void |
heartbeat() |
void |
rampDownReduces(int rampDown) |
void |
rampUpReduces(int rampUp) |
void |
scheduleAllReduces() |
void |
scheduleReduces(int totalMaps,
int completedMaps,
int scheduledMaps,
int scheduledReduces,
int assignedMaps,
int assignedReduces,
int mapResourceReqt,
int reduceResourceReqt,
int numPendingReduces,
float maxReduceRampupLimit,
float reduceSlowStart) |
protected void |
serviceInit(Configuration conf)
All initialization code needed by a service.
|
protected void |
serviceStart()
Actions called during the INITED to STARTED transition.
|
protected void |
serviceStop()
Actions called during the transition to the STOPPED state.
|
void |
setIsReduceStarted(boolean reduceStarted) |
addContainerReq, computeIgnoreBlacklisting, containerFailedOnHost, decContainerReq, getAvailableResources, getBlacklistedNodes, getFilteredContainerRequest, isNodeBlacklisted, makeRemoteRequest, release
createSchedulerProxy, doUnregistration, getApplicationProgress, getContext, getJob, getLastHeartbeatTime, getMaxContainerCapability, register, runOnNextHeartbeat, setShouldUnregister, setSignalled, startAllocatorThread, unregister
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public static final float DEFAULT_COMPLETED_MAPS_PERCENT_FOR_REDUCE_SLOWSTART
public RMContainerAllocator(ClientService clientService, AppContext context)
protected void serviceInit(Configuration conf) throws Exception
AbstractService
AbstractService.init(Configuration)
prevents re-entrancy.
The base implementation checks to see if the subclass has created
a new configuration instance, and if so, updates the base class valueserviceInit
in class RMContainerRequestor
conf
- configurationException
- on a failure -these will be caught,
possibly wrapped, and wil; trigger a service stopprotected void serviceStart() throws Exception
AbstractService
AbstractService.start()
prevents re-entrancy.serviceStart
in class RMCommunicator
Exception
- if needed -these will be caught,
wrapped, and trigger a service stopprotected void heartbeat() throws Exception
heartbeat
in class RMCommunicator
Exception
protected void serviceStop() throws Exception
AbstractService
AbstractService.stop()
prevents re-entrancy.
Implementations MUST write this to be robust against failures, including
checks for null references -and for the first failure to not stop other
attempts to shut down parts of the service.serviceStop
in class RMCommunicator
Exception
- if needed -these will be caught and logged.public boolean getIsReduceStarted()
public void setIsReduceStarted(boolean reduceStarted)
public void handle(ContainerAllocatorEvent event)
handle
in interface EventHandler<ContainerAllocatorEvent>
protected void handleEvent(ContainerAllocatorEvent event)
@InterfaceAudience.Private public void scheduleReduces(int totalMaps, int completedMaps, int scheduledMaps, int scheduledReduces, int assignedMaps, int assignedReduces, int mapResourceReqt, int reduceResourceReqt, int numPendingReduces, float maxReduceRampupLimit, float reduceSlowStart)
@InterfaceAudience.Private public void scheduleAllReduces()
@InterfaceAudience.Private public void rampUpReduces(int rampUp)
@InterfaceAudience.Private public void rampDownReduces(int rampDown)
public TaskAttemptEvent createContainerFinishedEvent(ContainerStatus cont, TaskAttemptId attemptID)
@InterfaceAudience.Private public int getMemLimit()
Copyright © 2013 Apache Software Foundation. All rights reserved.