Class TimelineV2ClientImpl

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.client.api.TimelineV2Client
org.apache.hadoop.yarn.client.api.impl.TimelineV2ClientImpl
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

public class TimelineV2ClientImpl extends TimelineV2Client
Implementation of timeline v2 client interface.
  • 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
    TimelineV2ClientImpl(org.apache.hadoop.yarn.api.records.ApplicationId appId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.yarn.api.records.ApplicationId
     
    void
    putEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities)
    Send the information of a number of conceptual entities within the scope of YARN application to the timeline service v.2 collector.
    void
    putEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities)
    Send the information of a number of conceptual entities within the scope of YARN application to the timeline service v.2 collector.
    protected void
    putObjects(String path, javax.ws.rs.core.MultivaluedMap<String,String> params, Object obj)
     
    protected void
    putObjects(URI base, String path, javax.ws.rs.core.MultivaluedMap<String,String> params, Object obj)
     
    void
    putSubAppEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities)
    Send the information of a number of conceptual entities within the scope of a sub-application to the timeline service v.2 collector.
    void
    putSubAppEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities)
    Send the information of a number of conceptual entities within the scope of a sub-application to the timeline service v.2 collector.
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
     
    void
    setTimelineCollectorInfo(org.apache.hadoop.yarn.api.records.CollectorInfo collectorInfo)
    Update collector info received in AllocateResponse which contains the timeline service address where the request will be sent to and the timeline delegation token which will be used to send the request.

    Methods inherited from class org.apache.hadoop.yarn.client.api.TimelineV2Client

    createTimelineClient

    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

    • TimelineV2ClientImpl

      public TimelineV2ClientImpl(org.apache.hadoop.yarn.api.records.ApplicationId appId)
  • Method Details

    • getContextAppId

      public org.apache.hadoop.yarn.api.records.ApplicationId getContextAppId()
    • serviceInit

      protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Overrides:
      serviceInit in class org.apache.hadoop.service.CompositeService
      Throws:
      Exception
    • 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
    • putEntities

      public void putEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from class: TimelineV2Client

      Send the information of a number of conceptual entities within the scope of YARN application to the timeline service v.2 collector. It is a blocking API. The method will not return until all the put entities have been persisted.

      Specified by:
      putEntities in class TimelineV2Client
      Parameters:
      entities - the collection of TimelineEntity
      Throws:
      IOException - if there are I/O errors
      org.apache.hadoop.yarn.exceptions.YarnException - if entities are incomplete/invalid
    • putEntitiesAsync

      public void putEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from class: TimelineV2Client

      Send the information of a number of conceptual entities within the scope of YARN application to the timeline service v.2 collector. It is an asynchronous API. The method will return once all the entities are received.

      Specified by:
      putEntitiesAsync in class TimelineV2Client
      Parameters:
      entities - the collection of TimelineEntity
      Throws:
      IOException - if there are I/O errors
      org.apache.hadoop.yarn.exceptions.YarnException - if entities are incomplete/invalid
    • putSubAppEntities

      public void putSubAppEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from class: TimelineV2Client

      Send the information of a number of conceptual entities within the scope of a sub-application to the timeline service v.2 collector. It is a blocking API. The method will not return until all the put entities have been persisted.

      Specified by:
      putSubAppEntities in class TimelineV2Client
      Parameters:
      entities - the collection of TimelineEntity
      Throws:
      IOException - if there are I/O errors
      org.apache.hadoop.yarn.exceptions.YarnException - if entities are incomplete/invalid
    • putSubAppEntitiesAsync

      public void putSubAppEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity... entities) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from class: TimelineV2Client

      Send the information of a number of conceptual entities within the scope of a sub-application to the timeline service v.2 collector. It is an asynchronous API. The method will return once all the entities are received .

      Specified by:
      putSubAppEntitiesAsync in class TimelineV2Client
      Parameters:
      entities - the collection of TimelineEntity
      Throws:
      IOException - if there are I/O errors
      org.apache.hadoop.yarn.exceptions.YarnException - if entities are incomplete/invalid
    • setTimelineCollectorInfo

      public void setTimelineCollectorInfo(org.apache.hadoop.yarn.api.records.CollectorInfo collectorInfo)
      Description copied from class: TimelineV2Client

      Update collector info received in AllocateResponse which contains the timeline service address where the request will be sent to and the timeline delegation token which will be used to send the request.

      Specified by:
      setTimelineCollectorInfo in class TimelineV2Client
      Parameters:
      collectorInfo - Collector info which contains the timeline service address and timeline delegation token.
    • putObjects

      @Private protected void putObjects(String path, javax.ws.rs.core.MultivaluedMap<String,String> params, Object obj) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Throws:
      IOException
      org.apache.hadoop.yarn.exceptions.YarnException
    • putObjects

      protected void putObjects(URI base, String path, javax.ws.rs.core.MultivaluedMap<String,String> params, Object obj) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Throws:
      IOException
      org.apache.hadoop.yarn.exceptions.YarnException