org.apache.hadoop.yarn.client.api

## 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

      @InterfaceAudience.Public
       @InterfaceStability.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 and Description
    `TimelineReaderClient(String name)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TimelineReaderClient` | `createTimelineReaderClient()` 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 Detail

    - #### TimelineReaderClient

          @InterfaceAudience.Private
          public TimelineReaderClient(String name)

  - ### Method Detail

    - #### createTimelineReaderClient

          @InterfaceAudience.Public
          public static TimelineReaderClient createTimelineReaderClient()

      Create a new 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`

    - #### 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`

    - #### 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`

    - #### 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`

    - #### 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`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.