public class FrameStorageAdapter extends Object implements StorageAdapter
StorageAdapter implementation based on a single Frame.
This class is used for both columnar and row-based frames.| Constructor and Description |
|---|
FrameStorageAdapter(Frame frame,
FrameReader frameReader,
org.joda.time.Interval interval) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canVectorize(Filter filter,
VirtualColumns virtualColumns,
boolean descending)
Returns true if the provided combination of parameters can be handled by "makeVectorCursor".
|
Indexed<String> |
getAvailableDimensions() |
Iterable<String> |
getAvailableMetrics() |
ColumnCapabilities |
getColumnCapabilities(String column)
Returns capabilities of a particular column, if known.
|
int |
getDimensionCardinality(String column)
Returns the number of distinct values for a column, or
DimensionDictionarySelector.CARDINALITY_UNKNOWN
if unknown. |
org.joda.time.Interval |
getInterval() |
org.joda.time.DateTime |
getMaxIngestedEventTime() |
org.joda.time.DateTime |
getMaxTime()
Metadata-only operation that returns an upper bound on
ColumnHolder.TIME_COLUMN_NAME values for this adapter. |
Comparable |
getMaxValue(String column)
Returns the minimum value of the provided column, if known through an index, dictionary, or cache.
|
Metadata |
getMetadata() |
org.joda.time.DateTime |
getMinTime()
Metadata-only operation that returns a lower bound on
ColumnHolder.TIME_COLUMN_NAME values for this adapter. |
Comparable |
getMinValue(String column)
Returns the minimum value of the provided column, if known through an index, dictionary, or cache.
|
int |
getNumRows() |
RowSignature |
getRowSignature()
Returns the row signature of the data available from this adapter.
|
Sequence<Cursor> |
makeCursors(Filter filter,
org.joda.time.Interval interval,
VirtualColumns virtualColumns,
Granularity gran,
boolean descending,
QueryMetrics<?> queryMetrics)
Creates a sequence of Cursors, one for each time-granular bucket (based on the provided Granularity).
|
VectorCursor |
makeVectorCursor(Filter filter,
org.joda.time.Interval interval,
VirtualColumns virtualColumns,
boolean descending,
int vectorSize,
QueryMetrics<?> queryMetrics)
Creates a VectorCursor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasBuiltInFilters, isFromTombstonegetColumnCapabilitiesWithDefault, getTypeareNumeric, areNumeric, areSameTypes, areSameTypes, areScalar, areScalar, canVectorize, canVectorizepublic FrameStorageAdapter(Frame frame, FrameReader frameReader, org.joda.time.Interval interval)
public org.joda.time.Interval getInterval()
getInterval in interface StorageAdapterpublic RowSignature getRowSignature()
StorageAdaptergetRowSignature in interface StorageAdapterpublic Indexed<String> getAvailableDimensions()
getAvailableDimensions in interface StorageAdapterpublic Iterable<String> getAvailableMetrics()
getAvailableMetrics in interface StorageAdapterpublic int getDimensionCardinality(String column)
StorageAdapterDimensionDictionarySelector.CARDINALITY_UNKNOWN
if unknown.
If the column doesn't exist, returns 1, because a column that doesn't exist is treated as a column of default
(or null) values.getDimensionCardinality in interface StorageAdapterpublic org.joda.time.DateTime getMinTime()
StorageAdapterColumnHolder.TIME_COLUMN_NAME values for this adapter. May be earlier than
the actual minimum data timestamp.
For QueryableIndexStorageAdapter and IncrementalIndexStorageAdapter
specifically, which back regular tables (i.e. TableDataSource), this method
contract is tighter: it does return the actual minimum data timestamp. This fact is leveraged by
TimeBoundaryQuery to return results using metadata only.getMinTime in interface StorageAdapterpublic org.joda.time.DateTime getMaxTime()
StorageAdapterColumnHolder.TIME_COLUMN_NAME values for this adapter. May be later than
the actual maximum data timestamp.
For QueryableIndexStorageAdapter and IncrementalIndexStorageAdapter
specifically, which back regular tables (i.e. TableDataSource), this method
contract is tighter: it does return the actual maximum data timestamp. This fact is leveraged by
TimeBoundaryQuery to return results using metadata only.getMaxTime in interface StorageAdapter@Nullable public Comparable getMinValue(String column)
StorageAdaptergetMinValue in interface StorageAdapter@Nullable public Comparable getMaxValue(String column)
StorageAdaptergetMaxValue in interface StorageAdapter@Nullable public ColumnCapabilities getColumnCapabilities(String column)
StorageAdapterColumnSelectorFactory.getColumnCapabilities(String), which returns capabilities for virtual columns as
well.getColumnCapabilities in interface ColumnInspectorgetColumnCapabilities in interface StorageAdaptercolumn - column namepublic int getNumRows()
getNumRows in interface StorageAdapterpublic org.joda.time.DateTime getMaxIngestedEventTime()
getMaxIngestedEventTime in interface StorageAdapter@Nullable public Metadata getMetadata()
getMetadata in interface StorageAdapterpublic boolean canVectorize(@Nullable Filter filter, VirtualColumns virtualColumns, boolean descending)
CursorFactorycanVectorize in interface CursorFactorypublic Sequence<Cursor> makeCursors(@Nullable Filter filter, org.joda.time.Interval interval, VirtualColumns virtualColumns, Granularity gran, boolean descending, @Nullable QueryMetrics<?> queryMetrics)
CursorFactorymakeCursors in interface CursorFactory@Nullable public VectorCursor makeVectorCursor(@Nullable Filter filter, org.joda.time.Interval interval, VirtualColumns virtualColumns, boolean descending, int vectorSize, @Nullable QueryMetrics<?> queryMetrics)
CursorFactorymakeVectorCursor in interface CursorFactoryCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.