Class NoOpTimelineWriterImpl

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.timelineservice.storage.NoOpTimelineWriterImpl
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service, TimelineWriter

public class NoOpTimelineWriterImpl extends org.apache.hadoop.service.AbstractService implements TimelineWriter
Stub based implementation for TimelineWriter. This implementation will not provide a complete implementation of all the necessary features. This implementation is provided solely for basic testing purposes.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
     
  • 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 class org.apache.hadoop.service.AbstractService

    close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    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
  • Constructor Details

    • NoOpTimelineWriterImpl

      public NoOpTimelineWriterImpl()
  • Method Details

    • write

      public 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
      Description copied from interface: TimelineWriter
      Stores the entire information in TimelineEntities to the timeline store. Any errors occurring for individual write request objects will be reported in the response.
      Specified by:
      write in interface TimelineWriter
      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

      public org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain) throws IOException
      Description copied from interface: TimelineWriter
      Stores TimelineDomain object to the timeline store. Any errors occurring for individual write request objects will be reported in the response.
      Specified by:
      write in interface TimelineWriter
      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

      public org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse aggregate(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity data, TimelineAggregationTrack track) throws IOException
      Description copied from interface: TimelineWriter
      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.

      Specified by:
      aggregate in interface TimelineWriter
      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

      public void flush() throws IOException
      Description copied from interface: TimelineWriter
      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.
      Specified by:
      flush in interface TimelineWriter
      Throws:
      IOException - if there is any exception encountered while flushing entities to the backend storage.
    • getHealthStatus

      public org.apache.hadoop.yarn.api.records.timeline.TimelineHealth getHealthStatus()
      Description copied from interface: TimelineWriter
      Check if writer connection is working properly.
      Specified by:
      getHealthStatus in interface TimelineWriter
      Returns:
      True if writer connection works as expected, false otherwise.