Class TimelineReaderClientImpl

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

@Public @Evolving public class TimelineReaderClientImpl extends TimelineReaderClient
Implementation of TimelineReaderClient 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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected javax.ws.rs.core.Response
    doGetUri(URI base, String path, javax.ws.rs.core.MultivaluedMap<String,String> params)
     
    protected String
     
    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.
    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.
    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.
    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.
    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.
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     

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

    createTimelineReaderClient

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

    addIfService, addService, getServices, removeService, 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

    • TimelineReaderClientImpl

      public TimelineReaderClientImpl()
  • Method Details

    • serviceInit

      protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Overrides:
      serviceInit in class org.apache.hadoop.service.CompositeService
      Throws:
      Exception
    • getApplicationEntity

      public 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
      Description copied from class: TimelineReaderClient
      Gets application entity.
      Specified by:
      getApplicationEntity in class TimelineReaderClient
      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 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
      Description copied from class: TimelineReaderClient
      Gets application attempt entity.
      Specified by:
      getApplicationAttemptEntity in class TimelineReaderClient
      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 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
      Description copied from class: TimelineReaderClient
      Gets application attempt entities.
      Specified by:
      getApplicationAttemptEntities in class TimelineReaderClient
      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 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
      Description copied from class: TimelineReaderClient
      Gets Timeline entity for the container.
      Specified by:
      getContainerEntity in class TimelineReaderClient
      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 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
      Description copied from class: TimelineReaderClient
      Gets container entities for an application.
      Specified by:
      getContainerEntities in class TimelineReaderClient
      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.
    • encodeValue

      @VisibleForTesting protected String encodeValue(String value) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • doGetUri

      @VisibleForTesting protected javax.ws.rs.core.Response doGetUri(URI base, String path, javax.ws.rs.core.MultivaluedMap<String,String> params) throws IOException
      Throws:
      IOException