Class ServiceTimelinePublisher

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.service.timelineservice.ServiceTimelinePublisher
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

public class ServiceTimelinePublisher extends org.apache.hadoop.service.CompositeService
A single service that publishes all the Timeline Entities.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.service.CompositeService

    org.apache.hadoop.service.CompositeService.CompositeServiceShutdownHook

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
     

    Fields inherited from class org.apache.hadoop.service.CompositeService

    STOP_ONLY_STARTED_SERVICES
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServiceTimelinePublisher(org.apache.hadoop.yarn.client.api.TimelineV2Client client)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    componentFinished(Component comp, ComponentState state, long finishTime)
     
    void
     
    void
    componentInstanceFinished(org.apache.hadoop.yarn.api.records.ContainerId containerId, int exitCode, ContainerState state, String diagnostics)
     
    void
     
    void
     
    boolean
     
    void
    publishMetrics(Iterable<org.apache.hadoop.metrics2.AbstractMetric> metrics, String entityId, String entityType, long timestamp)
    Called from ServiceMetricsSink at regular interval of time.
    void
    serviceAttemptRegistered(Service service, org.apache.hadoop.conf.Configuration systemConf)
     
    void
    serviceAttemptUnregistered(org.apache.hadoop.yarn.service.ServiceContext context, org.apache.hadoop.yarn.api.records.FinalApplicationStatus status, String diagnostics)
     
    void
     
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration configuration)
     
    protected void
     

    Methods inherited from class org.apache.hadoop.service.CompositeService

    addIfService, addService, getServices, removeService, serviceStart

    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
  • Field Details

    • ATS_CONFIG_PUBLISH_SIZE_BYTES

      public static final int ATS_CONFIG_PUBLISH_SIZE_BYTES
      See Also:
  • Constructor Details

    • ServiceTimelinePublisher

      public ServiceTimelinePublisher(org.apache.hadoop.yarn.client.api.TimelineV2Client client)
  • Method Details

    • serviceInit

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

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

      public boolean isStopped()
    • serviceAttemptRegistered

      public void serviceAttemptRegistered(Service service, org.apache.hadoop.conf.Configuration systemConf)
    • serviceAttemptUpdated

      public void serviceAttemptUpdated(Service service)
    • serviceAttemptUnregistered

      public void serviceAttemptUnregistered(org.apache.hadoop.yarn.service.ServiceContext context, org.apache.hadoop.yarn.api.records.FinalApplicationStatus status, String diagnostics)
    • componentInstanceStarted

      public void componentInstanceStarted(Container container, ComponentInstance instance)
    • componentInstanceFinished

      public void componentInstanceFinished(org.apache.hadoop.yarn.api.records.ContainerId containerId, int exitCode, ContainerState state, String diagnostics)
    • componentInstanceIPHostUpdated

      public void componentInstanceIPHostUpdated(Container container)
    • componentInstanceBecomeReady

      public void componentInstanceBecomeReady(Container container)
    • publishMetrics

      public void publishMetrics(Iterable<org.apache.hadoop.metrics2.AbstractMetric> metrics, String entityId, String entityType, long timestamp)
      Called from ServiceMetricsSink at regular interval of time.
      Parameters:
      metrics - of service or components
      entityId - Id of entity
      entityType - Type of entity
      timestamp -
    • componentFinished

      public void componentFinished(Component comp, ComponentState state, long finishTime)