Interface TimelineWriter

All Superinterfaces:
AutoCloseable, Closeable, org.apache.hadoop.service.Service
All Known Implementing Classes:
NoOpTimelineWriterImpl

@Private @Unstable public interface TimelineWriter extends org.apache.hadoop.service.Service
This interface is for storing application timeline information.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse
    aggregate(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity data, TimelineAggregationTrack track)
    Aggregates the entity information to the timeline store based on which track this entity is to be rolled up to The tracks along which aggregations are to be done are given by TimelineAggregationTrack Any errors occurring for individual write request objects will be reported in the response.
    void
    Flushes the data to the backend storage.
    org.apache.hadoop.yarn.api.records.timeline.TimelineHealth
    Check if writer connection is working properly.
    org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse
    write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain)
    Stores TimelineDomain object to the timeline store.
    org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse
    write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities data, org.apache.hadoop.security.UserGroupInformation callerUgi)
    Stores the entire information in TimelineEntities to the timeline store.

    Methods inherited from interface org.apache.hadoop.service.Service

    close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
  • Method Details

    • write

      org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities data, org.apache.hadoop.security.UserGroupInformation callerUgi) throws IOException
      Stores the entire information in TimelineEntities to the timeline store. Any errors occurring for individual write request objects will be reported in the response.
      Parameters:
      context - a TimelineCollectorContext
      data - a TimelineEntities object.
      callerUgi - UserGroupInformation.
      Returns:
      a TimelineWriteResponse object.
      Throws:
      IOException - if there is any exception encountered while storing or writing entities to the back end storage.
    • write

      org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain) throws IOException
      Stores TimelineDomain object to the timeline store. Any errors occurring for individual write request objects will be reported in the response.
      Parameters:
      context - a TimelineCollectorContext
      domain - a TimelineDomain object.
      Returns:
      a TimelineWriteResponse object.
      Throws:
      IOException - if there is any exception encountered while storing or writing entities to the back end storage.
    • aggregate

      org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse aggregate(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity data, TimelineAggregationTrack track) throws IOException
      Aggregates the entity information to the timeline store based on which track this entity is to be rolled up to The tracks along which aggregations are to be done are given by TimelineAggregationTrack Any errors occurring for individual write request objects will be reported in the response.

      This is not invoked anywhere, tested and all implementations return null.

      Parameters:
      data - a TimelineEntity object a TimelineAggregationTrack enum value.
      track - Specifies the track or dimension along which aggregation would occur. Includes USER, FLOW, QUEUE, etc.
      Returns:
      a TimelineWriteResponse object. All implementations return null.
      Throws:
      IOException - if there is any exception encountered while aggregating entities to the backend storage.
    • flush

      void flush() throws IOException
      Flushes the data to the backend storage. Whatever may be buffered will be written to the storage when the method returns. This may be a potentially time-consuming operation, and should be used judiciously.
      Throws:
      IOException - if there is any exception encountered while flushing entities to the backend storage.
    • getHealthStatus

      org.apache.hadoop.yarn.api.records.timeline.TimelineHealth getHealthStatus()
      Check if writer connection is working properly.
      Returns:
      True if writer connection works as expected, false otherwise.