Class RMContainerAllocator

java.lang.Object
org.apache.hadoop.service.AbstractService
All Implemented Interfaces:
Closeable, AutoCloseable, 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.
  • Field Details

  • Constructor Details

  • Method Details

    • createAssignedRequests

      protected org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator.AssignedRequests createAssignedRequests()
    • 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

      @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()