Class TaskHeartbeatHandler

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.mapreduce.v2.app.TaskHeartbeatHandler
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

public class TaskHeartbeatHandler extends org.apache.hadoop.service.AbstractService
This class keeps track of tasks that have already been launched. It determines if a task is alive and running or marks a task as dead if it does not hear from it for a long time.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE
  • Constructor Summary

    Constructors
    Constructor
    Description
    TaskHeartbeatHandler(org.apache.hadoop.yarn.event.EventHandler eventHandler, org.apache.hadoop.yarn.util.Clock clock, int numThreads)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    boolean
    hasRecentlyUnregistered(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
     
    void
    progressing(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
     
    void
    register(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
     
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
     
    void
    unregister(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TaskHeartbeatHandler

      public TaskHeartbeatHandler(org.apache.hadoop.yarn.event.EventHandler eventHandler, org.apache.hadoop.yarn.util.Clock clock, int numThreads)
  • Method Details

    • serviceInit

      protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Overrides:
      serviceInit in class org.apache.hadoop.service.AbstractService
      Throws:
      Exception
    • serviceStart

      protected void serviceStart() throws Exception
      Overrides:
      serviceStart in class org.apache.hadoop.service.AbstractService
      Throws:
      Exception
    • serviceStop

      protected void serviceStop() throws Exception
      Overrides:
      serviceStop in class org.apache.hadoop.service.AbstractService
      Throws:
      Exception
    • progressing

      public void progressing(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
    • register

      public void register(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
    • unregister

      public void unregister(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
    • hasRecentlyUnregistered

      public boolean hasRecentlyUnregistered(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
    • getTaskTimeOut

      @VisibleForTesting public long getTaskTimeOut()