org.apache.hadoop.mapreduce.v2.app.rm
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, ContainerAllocator, RMHeartbeatHandler, org.apache.hadoop.service.Service, org.apache.hadoop.yarn.event.EventHandler<ContainerAllocatorEvent>
public class RMContainerAllocator
- extends RMContainerRequestor
- implements ContainerAllocator
Allocates the container from the ResourceManager scheduler.
| Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
org.apache.hadoop.service.Service.STATE |
|
Method Summary |
TaskAttemptEvent |
createContainerFinishedEvent(org.apache.hadoop.yarn.api.records.ContainerStatus cont,
org.apache.hadoop.mapreduce.v2.api.records.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(org.apache.hadoop.conf.Configuration conf)
|
protected void |
serviceStart()
|
protected void |
serviceStop()
|
void |
setIsReduceStarted(boolean reduceStarted)
|
| Methods inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator |
createSchedulerProxy, doUnregistration, getApplicationProgress, getContext, getJob, getLastHeartbeatTime, getMaxContainerCapability, isApplicationMasterRegistered, register, runOnNextHeartbeat, setShouldUnregister, setSignalled, startAllocatorThread, unregister |
| Methods 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 |
DEFAULT_COMPLETED_MAPS_PERCENT_FOR_REDUCE_SLOWSTART
public static final float DEFAULT_COMPLETED_MAPS_PERCENT_FOR_REDUCE_SLOWSTART
- See Also:
- Constant Field Values
RMContainerAllocator
public RMContainerAllocator(ClientService clientService,
AppContext context)
serviceInit
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
- Overrides:
serviceInit in class RMContainerRequestor
- Throws:
Exception
serviceStart
protected void serviceStart()
throws Exception
- Overrides:
serviceStart in class RMCommunicator
- Throws:
Exception
heartbeat
protected void heartbeat()
throws Exception
- Specified by:
heartbeat in class RMCommunicator
- Throws:
Exception
serviceStop
protected void serviceStop()
throws Exception
- Overrides:
serviceStop in class RMCommunicator
- Throws:
Exception
getIsReduceStarted
public boolean getIsReduceStarted()
setIsReduceStarted
public void setIsReduceStarted(boolean reduceStarted)
handle
public void handle(ContainerAllocatorEvent event)
- Specified by:
handle in interface org.apache.hadoop.yarn.event.EventHandler<ContainerAllocatorEvent>
handleEvent
protected void handleEvent(ContainerAllocatorEvent event)
scheduleReduces
@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)
scheduleAllReduces
@InterfaceAudience.Private
public void scheduleAllReduces()
rampUpReduces
@InterfaceAudience.Private
public void rampUpReduces(int rampUp)
rampDownReduces
@InterfaceAudience.Private
public void rampDownReduces(int rampDown)
createContainerFinishedEvent
public TaskAttemptEvent createContainerFinishedEvent(org.apache.hadoop.yarn.api.records.ContainerStatus cont,
org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
getMemLimit
@InterfaceAudience.Private
public int getMemLimit()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.