Class AbstractTimelineStorageReader

java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.storage.reader.AbstractTimelineStorageReader
Direct Known Subclasses:
EntityTypeReader, TimelineEntityReader

public abstract class AbstractTimelineStorageReader extends Object
The base class for reading timeline data from the HBase storage. This class provides basic support to validate and augment reader context.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
    Encapsulates flow context information.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractTimelineStorageReader(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext ctxt)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    augmentParams(org.apache.hadoop.conf.Configuration hbaseConf, org.apache.hadoop.hbase.client.Connection conn)
    Sets certain parameters to defaults if the values are not provided.
    protected final void
    defaultAugmentParams(org.apache.hadoop.conf.Configuration hbaseConf, org.apache.hadoop.hbase.client.Connection conn)
    Default behavior for all timeline readers to augment parameters.
    protected org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext
     
    lookupFlowContext(org.apache.hadoop.yarn.server.timelineservice.storage.apptoflow.AppToFlowRowKey appToFlowRowKey, String clusterId, org.apache.hadoop.conf.Configuration hbaseConf, org.apache.hadoop.hbase.client.Connection conn)
    Looks up flow context from AppToFlow table.
    protected abstract void
    Validates the required parameters to read the entities.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractTimelineStorageReader

      public AbstractTimelineStorageReader(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext ctxt)
  • Method Details

    • getContext

      protected org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext getContext()
    • lookupFlowContext

      protected AbstractTimelineStorageReader.FlowContext lookupFlowContext(org.apache.hadoop.yarn.server.timelineservice.storage.apptoflow.AppToFlowRowKey appToFlowRowKey, String clusterId, org.apache.hadoop.conf.Configuration hbaseConf, org.apache.hadoop.hbase.client.Connection conn) throws IOException
      Looks up flow context from AppToFlow table.
      Parameters:
      appToFlowRowKey - to identify Cluster and App Ids.
      clusterId - the cluster id.
      hbaseConf - HBase configuration.
      conn - HBase Connection.
      Returns:
      flow context information.
      Throws:
      IOException - if any problem occurs while fetching flow information.
    • augmentParams

      protected void augmentParams(org.apache.hadoop.conf.Configuration hbaseConf, org.apache.hadoop.hbase.client.Connection conn) throws IOException
      Sets certain parameters to defaults if the values are not provided.
      Parameters:
      hbaseConf - HBase Configuration.
      conn - HBase Connection.
      Throws:
      IOException - if any exception is encountered while setting params.
    • defaultAugmentParams

      protected final void defaultAugmentParams(org.apache.hadoop.conf.Configuration hbaseConf, org.apache.hadoop.hbase.client.Connection conn) throws IOException
      Default behavior for all timeline readers to augment parameters.
      Parameters:
      hbaseConf - HBase Configuration.
      conn - HBase Connection.
      Throws:
      IOException - if any exception is encountered while setting params.
    • validateParams

      protected abstract void validateParams()
      Validates the required parameters to read the entities.