Class PerNodeTimelineCollectorsAuxService

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.api.AuxiliaryService
org.apache.hadoop.yarn.server.timelineservice.collector.PerNodeTimelineCollectorsAuxService
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

@Private @Unstable public class PerNodeTimelineCollectorsAuxService extends org.apache.hadoop.yarn.server.api.AuxiliaryService
The top-level server for the per-node timeline collector manager. Currently it is defined as an auxiliary service to accommodate running within another daemon (e.g. node manager).
  • 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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addApplicationIfAbsent(org.apache.hadoop.yarn.api.records.ApplicationId appId, String user)
    Creates and adds an app level collector for the specified application id.
     
    void
    initializeApplication(org.apache.hadoop.yarn.server.api.ApplicationInitializationContext context)
     
    void
    initializeContainer(org.apache.hadoop.yarn.server.api.ContainerInitializationContext context)
    Creates and adds an app level collector for the specified application id.
    launchServer(String[] args, NodeTimelineCollectorManager collectorManager, org.apache.hadoop.conf.Configuration conf)
     
    static void
    main(String[] args)
     
    boolean
    removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
    Removes the app level collector for the specified application id.
    protected Future
    removeApplicationCollector(org.apache.hadoop.yarn.api.records.ContainerId containerId)
     
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
     
    void
    stopApplication(org.apache.hadoop.yarn.server.api.ApplicationTerminationContext context)
     
    void
    stopContainer(org.apache.hadoop.yarn.server.api.ContainerTerminationContext context)
    Removes the app level collector for the specified application id.

    Methods inherited from class org.apache.hadoop.yarn.server.api.AuxiliaryService

    getAuxiliaryLocalPathHandler, getRecoveryPath, setAuxiliaryLocalPathHandler, setRecoveryPath

    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

    • PerNodeTimelineCollectorsAuxService

      public PerNodeTimelineCollectorsAuxService()
  • 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
    • addApplicationIfAbsent

      public boolean addApplicationIfAbsent(org.apache.hadoop.yarn.api.records.ApplicationId appId, String user)
      Creates and adds an app level collector for the specified application id. The collector is also initialized and started. If the service already exists, no new service is created.
      Parameters:
      appId - Application Id to be added.
      user - Application Master container user.
      Returns:
      whether it was added successfully
    • removeApplication

      public boolean removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
      Removes the app level collector for the specified application id. The collector is also stopped as a result. If the collector does not exist, no change is made.
      Parameters:
      appId - Application Id to be removed.
      Returns:
      whether it was removed successfully
    • initializeContainer

      public void initializeContainer(org.apache.hadoop.yarn.server.api.ContainerInitializationContext context)
      Creates and adds an app level collector for the specified application id. The collector is also initialized and started. If the collector already exists, no new collector is created.
      Overrides:
      initializeContainer in class org.apache.hadoop.yarn.server.api.AuxiliaryService
    • stopContainer

      public void stopContainer(org.apache.hadoop.yarn.server.api.ContainerTerminationContext context)
      Removes the app level collector for the specified application id. The collector is also stopped as a result. If the collector does not exist, no change is made.
      Overrides:
      stopContainer in class org.apache.hadoop.yarn.server.api.AuxiliaryService
    • removeApplicationCollector

      @VisibleForTesting protected Future removeApplicationCollector(org.apache.hadoop.yarn.api.records.ContainerId containerId)
    • initializeApplication

      public void initializeApplication(org.apache.hadoop.yarn.server.api.ApplicationInitializationContext context)
      Specified by:
      initializeApplication in class org.apache.hadoop.yarn.server.api.AuxiliaryService
    • stopApplication

      public void stopApplication(org.apache.hadoop.yarn.server.api.ApplicationTerminationContext context)
      Specified by:
      stopApplication in class org.apache.hadoop.yarn.server.api.AuxiliaryService
    • getMetaData

      public ByteBuffer getMetaData()
      Specified by:
      getMetaData in class org.apache.hadoop.yarn.server.api.AuxiliaryService
    • launchServer

      @VisibleForTesting public static PerNodeTimelineCollectorsAuxService launchServer(String[] args, NodeTimelineCollectorManager collectorManager, org.apache.hadoop.conf.Configuration conf)
    • main

      public static void main(String[] args)