EncodedType
- class of a single encoded valueEncodedKeyComponentType
- A row key contains a component for each dimension, this param specifies the
class of this dimension's key component. A column type that supports multivalue rows
should use an array type (e.g., Strings would use int[]). Column types without
multivalue row support should use single objects (e.g., Long, Float).ActualType
- class of a single actual valuepublic interface DimensionIndexer<EncodedType extends Comparable<EncodedType>,EncodedKeyComponentType,ActualType extends Comparable<ActualType>>
Modifier and Type | Field and Description |
---|---|
static boolean |
ARRAY |
static boolean |
LIST |
Modifier and Type | Method and Description |
---|---|
boolean |
checkUnsortedEncodedKeyComponentsEqual(EncodedKeyComponentType lhs,
EncodedKeyComponentType rhs)
Check if two row value arrays from TimeAndDims keys are equal.
|
int |
compareUnsortedEncodedKeyComponents(EncodedKeyComponentType lhs,
EncodedKeyComponentType rhs)
Compares the row values for this DimensionIndexer's dimension from a TimeAndDims key.
|
Object |
convertUnsortedEncodedKeyComponentToActualArrayOrList(EncodedKeyComponentType key,
boolean asList)
Given a row value array from a TimeAndDims key, as described in the documentation for
compareUnsortedEncodedKeyComponents(), convert the unsorted encoded values to a list or array of actual values.
|
EncodedKeyComponentType |
convertUnsortedEncodedKeyComponentToSortedEncodedKeyComponent(EncodedKeyComponentType key)
Given a row value array from a TimeAndDims key, as described in the documentation for
compareUnsortedEncodedKeyComponents(), convert the unsorted encoded values to an array of sorted encoded values
(i.e., sorted by their corresponding actual values)
|
void |
fillBitmapsFromUnsortedEncodedKeyComponent(EncodedKeyComponentType key,
int rowNum,
MutableBitmap[] bitmapIndexes,
BitmapFactory factory)
Helper function for building bitmap indexes for integer-encoded dimensions.
|
int |
getCardinality()
Get the cardinality of this dimension's values.
|
ActualType |
getMaxValue()
Get the maximum dimension value seen by this indexer.
|
ActualType |
getMinValue()
Get the minimum dimension value seen by this indexer.
|
Indexed<ActualType> |
getSortedIndexedValues()
Returns an indexed structure of this dimension's sorted actual values.
|
int |
getUnsortedEncodedKeyComponentHashCode(EncodedKeyComponentType key)
Given a row value array from a TimeAndDims key, generate a hashcode.
|
EncodedType |
getUnsortedEncodedValueFromSorted(EncodedType sortedIntermediateValue)
Given an encoded value that was ordered by associated actual value, return the equivalent
encoded value ordered by time of ingestion.
|
ColumnValueSelector<?> |
makeColumnValueSelector(TimeAndDimsHolder currEntry,
IncrementalIndex.DimensionDesc desc)
Return an object used to read values from this indexer's column.
|
DimensionSelector |
makeDimensionSelector(DimensionSpec spec,
TimeAndDimsHolder currEntry,
IncrementalIndex.DimensionDesc desc)
Return an object used to read values from this indexer's column as Strings.
|
EncodedKeyComponentType |
processRowValsToUnsortedEncodedKeyComponent(Object dimValues,
boolean reportParseExceptions)
Given a single row value or list of row values (for multi-valued dimensions), update any internal data structures
with the ingested values and return the row values as an array to be used within a TimeAndDims key.
|
static final boolean LIST
static final boolean ARRAY
EncodedKeyComponentType processRowValsToUnsortedEncodedKeyComponent(Object dimValues, boolean reportParseExceptions)
dimValues
- Single row val to processreportParseExceptions
- EncodedType getUnsortedEncodedValueFromSorted(EncodedType sortedIntermediateValue)
sortedIntermediateValue
- value to convertIndexed<ActualType> getSortedIndexedValues()
ActualType getMinValue()
ActualType getMaxValue()
int getCardinality()
DimensionSelector makeDimensionSelector(DimensionSpec spec, TimeAndDimsHolder currEntry, IncrementalIndex.DimensionDesc desc)
spec
- Specifies the output name of a dimension and any extraction functions to be applied.currEntry
- Provides access to the current TimeAndDims object in the Cursordesc
- Descriptor object for this dimension within an IncrementalIndexColumnValueSelector<?> makeColumnValueSelector(TimeAndDimsHolder currEntry, IncrementalIndex.DimensionDesc desc)
currEntry
- Provides access to the current TimeAndDims object in the Cursordesc
- Descriptor object for this dimension within an IncrementalIndexint compareUnsortedEncodedKeyComponents(@Nullable EncodedKeyComponentType lhs, @Nullable EncodedKeyComponentType rhs)
lhs
- dimension value array from a TimeAndDims keyrhs
- dimension value array from a TimeAndDims keyboolean checkUnsortedEncodedKeyComponentsEqual(@Nullable EncodedKeyComponentType lhs, @Nullable EncodedKeyComponentType rhs)
lhs
- dimension value array from a TimeAndDims keyrhs
- dimension value array from a TimeAndDims keyint getUnsortedEncodedKeyComponentHashCode(@Nullable EncodedKeyComponentType key)
key
- dimension value array from a TimeAndDims keyObject convertUnsortedEncodedKeyComponentToActualArrayOrList(EncodedKeyComponentType key, boolean asList)
key
- dimension value array from a TimeAndDims keyasList
- if true, return an array; if false, return a listEncodedKeyComponentType convertUnsortedEncodedKeyComponentToSortedEncodedKeyComponent(EncodedKeyComponentType key)
key
- dimension value array from a TimeAndDims keyvoid fillBitmapsFromUnsortedEncodedKeyComponent(EncodedKeyComponentType key, int rowNum, MutableBitmap[] bitmapIndexes, BitmapFactory factory)
key
- dimension value array from a TimeAndDims keyrowNum
- current row numberbitmapIndexes
- array of bitmaps, indexed by integer dimension valuefactory
- bitmap factoryCopyright © 2011–2018. All rights reserved.