Class TimelineReaderClient

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.client.api.TimelineReaderClient
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service
Direct Known Subclasses:
TimelineReaderClientImpl

@Public @Evolving public abstract class TimelineReaderClient extends org.apache.hadoop.service.CompositeService
A client library that can be used to get Timeline Entities associated with application, application attempt or containers. This client library needs to be used along with time line v.2 server version.
  • 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
    Create a new instance of Timeline Reader Client.
    abstract List<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity>
    getApplicationAttemptEntities(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String,String> filters, long limit, String fromId)
    Gets application attempt entities.
    abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity
    getApplicationAttemptEntity(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, String fields, Map<String,String> filters)
    Gets application attempt entity.
    abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity
    getApplicationEntity(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String,String> filters)
    Gets application entity.
    abstract List<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity>
    getContainerEntities(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String,String> filters, long limit, String fromId)
    Gets container entities for an application.
    abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity
    getContainerEntity(org.apache.hadoop.yarn.api.records.ContainerId containerId, String fields, Map<String,String> filters)
    Gets Timeline entity for the container.

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

    addIfService, addService, getServices, removeService, serviceInit, serviceStart, serviceStop

    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

    • TimelineReaderClient

      @Private public TimelineReaderClient(String name)
  • Method Details

    • createTimelineReaderClient

      @Public public static TimelineReaderClient createTimelineReaderClient()
      Create a new instance of Timeline Reader Client.
      Returns:
      instance of Timeline Reader Client.
    • getApplicationEntity

      public abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getApplicationEntity(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String,String> filters) throws IOException
      Gets application entity.
      Parameters:
      appId - application id
      fields - Fields to be fetched. Defaults to INFO.
      filters - Filters to be applied while fetching entities.
      Returns:
      entity of the application
      Throws:
      IOException - io error occur.
    • getApplicationAttemptEntity

      public abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getApplicationAttemptEntity(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, String fields, Map<String,String> filters) throws IOException
      Gets application attempt entity.
      Parameters:
      appAttemptId - application attempt id
      fields - Fields to be fetched. Defaults to INFO.
      filters - Filters to be applied while fetching entities.
      Returns:
      entity associated with application attempt
      Throws:
      IOException - io error occur.
    • getApplicationAttemptEntities

      public abstract List<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity> getApplicationAttemptEntities(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String,String> filters, long limit, String fromId) throws IOException
      Gets application attempt entities.
      Parameters:
      appId - application id
      fields - Fields to be fetched. Defaults to INFO.
      filters - Filters to be applied while fetching entities.
      limit - Number of entities to return.
      fromId - Retrieve next set of generic ids from given fromId
      Returns:
      list of application attempt entities
      Throws:
      IOException - io error occur.
    • getContainerEntity

      public abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getContainerEntity(org.apache.hadoop.yarn.api.records.ContainerId containerId, String fields, Map<String,String> filters) throws IOException
      Gets Timeline entity for the container.
      Parameters:
      containerId - container id
      fields - Fields to be fetched. Defaults to INFO.
      filters - Filters to be applied while fetching entities.
      Returns:
      timeline entity for container
      Throws:
      IOException - io error occur.
    • getContainerEntities

      public abstract List<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity> getContainerEntities(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String,String> filters, long limit, String fromId) throws IOException
      Gets container entities for an application.
      Parameters:
      appId - application id
      fields - Fields to be fetched. Defaults to INFO.
      filters - Filters to be applied while fetching entities.
      limit - Number of entities to return.
      fromId - Retrieve next set of generic ids from given fromId
      Returns:
      list of entities
      Throws:
      IOException - io error occur.