org.apache.hadoop.mapreduce.v2.app.rm
Class RMContainerAllocator

java.lang.Object
  extended by org.apache.hadoop.yarn.service.AbstractService
      extended by org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
          extended by org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor
              extended by org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator
All Implemented Interfaces:
ContainerAllocator, org.apache.hadoop.yarn.event.EventHandler<ContainerAllocatorEvent>, org.apache.hadoop.yarn.service.Service

public class RMContainerAllocator
extends RMContainerRequestor
implements ContainerAllocator

Allocates the container from the ResourceManager scheduler.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.mapreduce.v2.app.rm.ContainerAllocator
ContainerAllocator.EventType
 
Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service
org.apache.hadoop.yarn.service.Service.STATE
 
Field Summary
static float DEFAULT_COMPLETED_MAPS_PERCENT_FOR_REDUCE_SLOWSTART
           
 
Fields inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
allocatorThread, applicationACLs, applicationAttemptId, applicationId, eventHandler, scheduler
 
Constructor Summary
RMContainerAllocator(ClientService clientService, AppContext context)
           
 
Method Summary
 boolean getIsReduceStarted()
           
 int getMemLimit()
           
 void handle(ContainerAllocatorEvent event)
           
protected  void handleEvent(ContainerAllocatorEvent event)
           
protected  void heartbeat()
           
 void init(org.apache.hadoop.conf.Configuration conf)
           
 void rampDownReduces(int rampDown)
           
 void rampUpReduces(int rampUp)
           
 void scheduleReduces(int totalMaps, int completedMaps, int scheduledMaps, int scheduledReduces, int assignedMaps, int assignedReduces, int mapResourceReqt, int reduceResourceReqt, int numPendingReduces, float maxReduceRampupLimit, float reduceSlowStart)
           
 void setIsReduceStarted(boolean reduceStarted)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMContainerRequestor
addContainerReq, computeIgnoreBlacklisting, containerFailedOnHost, decContainerReq, getAvailableResources, getFilteredContainerRequest, isNodeBlacklisted, makeRemoteRequest, release
 
Methods inherited from class org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
createSchedulerProxy, getApplicationProgress, getContext, getJob, getMaxContainerCapability, getMinContainerCapability, register, startAllocatorThread, unregister
 
Methods inherited from class org.apache.hadoop.yarn.service.AbstractService
getConfig, getName, getServiceState, getStartTime, register, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COMPLETED_MAPS_PERCENT_FOR_REDUCE_SLOWSTART

public static final float DEFAULT_COMPLETED_MAPS_PERCENT_FOR_REDUCE_SLOWSTART
See Also:
Constant Field Values
Constructor Detail

RMContainerAllocator

public RMContainerAllocator(ClientService clientService,
                            AppContext context)
Method Detail

init

public void init(org.apache.hadoop.conf.Configuration conf)
Specified by:
init in interface org.apache.hadoop.yarn.service.Service
Overrides:
init in class RMContainerRequestor

start

public void start()
Specified by:
start in interface org.apache.hadoop.yarn.service.Service
Overrides:
start in class RMCommunicator

heartbeat

protected void heartbeat()
                  throws Exception
Specified by:
heartbeat in class RMCommunicator
Throws:
Exception

stop

public void stop()
Specified by:
stop in interface org.apache.hadoop.yarn.service.Service
Overrides:
stop in class RMCommunicator

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)

rampUpReduces

@InterfaceAudience.Private
public void rampUpReduces(int rampUp)

rampDownReduces

@InterfaceAudience.Private
public void rampDownReduces(int rampDown)

getMemLimit

@InterfaceAudience.Private
public int getMemLimit()


Copyright © 2012 Apache Software Foundation. All Rights Reserved.