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

public class NMTimelinePublisher extends org.apache.hadoop.service.CompositeService
Metrics publisher service that publishes data to the timeline service v.2. It is used only if the timeline service v.2 is enabled and the system publishing of events and metrics is enabled.
  • 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 inherited from class org.apache.hadoop.service.CompositeService

    STOP_ONLY_STARTED_SERVICES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.hadoop.yarn.event.AsyncDispatcher
     
    void
    createTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId)
     
    protected void
     
    void
     
    void
     
    void
     
    void
    reportContainerResourceUsage(Container container, Long pmemUsage, Float cpuUsagePercentPerCore)
     
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
     
    void
    setTimelineServiceAddress(org.apache.hadoop.yarn.api.records.ApplicationId appId, String collectorAddr)
     
    void
    stopTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId)
     

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

    addIfService, addService, getServices, removeService

    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

    • NMTimelinePublisher

      public NMTimelinePublisher(Context context)
  • Method Details

    • serviceInit

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

      protected org.apache.hadoop.yarn.event.AsyncDispatcher createDispatcher()
    • serviceStart

      protected void serviceStart() throws Exception
      Overrides:
      serviceStart 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
    • handleNMTimelineEvent

      protected void handleNMTimelineEvent(NMTimelineEvent event)
    • reportContainerResourceUsage

      public void reportContainerResourceUsage(Container container, Long pmemUsage, Float cpuUsagePercentPerCore)
    • publishApplicationEvent

      public void publishApplicationEvent(ApplicationEvent event)
    • publishContainerEvent

      public void publishContainerEvent(ContainerEvent event)
    • publishLocalizationEvent

      public void publishLocalizationEvent(LocalizationEvent event)
    • createTimelineClient

      public void createTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId)
    • stopTimelineClient

      public void stopTimelineClient(org.apache.hadoop.yarn.api.records.ApplicationId appId)
    • setTimelineServiceAddress

      public void setTimelineServiceAddress(org.apache.hadoop.yarn.api.records.ApplicationId appId, String collectorAddr)