Class TimelineReaderClient

All Implemented Interfaces:
Closeable, AutoCloseable, Service
Direct Known Subclasses:
TimelineReaderClientImpl

@Public @Evolving public abstract class TimelineReaderClient extends 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.
  • 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 TimelineEntity getApplicationEntity(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 TimelineEntity getApplicationAttemptEntity(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<TimelineEntity> getApplicationAttemptEntities(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 TimelineEntity getContainerEntity(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<TimelineEntity> getContainerEntities(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.