Class RouterHeartbeatService

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.hdfs.server.federation.router.PeriodicService
org.apache.hadoop.hdfs.server.federation.router.RouterHeartbeatService
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

public class RouterHeartbeatService extends PeriodicService
Service to periodically update the Router current state in the State Store.
  • 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
    Create a new Router heartbeat service.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Method that the service will run periodically.
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
    Trigger the update of the Router state asynchronously.

    Methods inherited from class org.apache.hadoop.hdfs.server.federation.router.PeriodicService

    getErrorCount, getIntervalMs, getLastUpdate, getRunCount, serviceStart, serviceStop, setIntervalMs, startPeriodic, stopPeriodic

    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

    • RouterHeartbeatService

      public RouterHeartbeatService(Router router)
      Create a new Router heartbeat service.
      Parameters:
      router - Router to heartbeat.
  • Method Details

    • updateStateAsync

      protected void updateStateAsync()
      Trigger the update of the Router state asynchronously.
    • serviceInit

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

      public void periodicInvoke()
      Description copied from class: PeriodicService
      Method that the service will run periodically.
      Specified by:
      periodicInvoke in class PeriodicService