Class AbstractTimelineStorageReader
java.lang.Object
org.apache.hadoop.yarn.server.timelineservice.storage.reader.AbstractTimelineStorageReader
- Direct Known Subclasses:
EntityTypeReader,TimelineEntityReader
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 ClassesModifier and TypeClassDescriptionprotected static classEncapsulates flow context information. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTimelineStorageReader(org.apache.hadoop.yarn.server.timelineservice.reader.TimelineReaderContext ctxt) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaugmentParams(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 voiddefaultAugmentParams(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.TimelineReaderContextlookupFlowContext(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 voidValidates the required parameters to read the entities.
-
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.
-