EncodedType - class of the encoded valuesActualType - class of the actual valuespublic interface DimensionIndexer<EncodedType extends Comparable<EncodedType>,EncodedTypeArray,ActualType extends Comparable<ActualType>>
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkUnsortedEncodedArraysEqual(EncodedTypeArray lhs,
EncodedTypeArray rhs)
Check if two row value arrays from TimeAndDims keys are equal.
|
int |
compareUnsortedEncodedArrays(EncodedTypeArray lhs,
EncodedTypeArray rhs)
Compares the row values for this DimensionIndexer's dimension from a TimeAndDims key.
|
Object |
convertUnsortedEncodedArrayToActualArrayOrList(EncodedTypeArray key,
boolean asList)
Given a row value array from a TimeAndDims key, as described in the documentatiion for compareUnsortedEncodedArrays(),
convert the unsorted encoded values to a list or array of actual values.
|
EncodedTypeArray |
convertUnsortedEncodedArrayToSortedEncodedArray(EncodedTypeArray key)
Given a row value array from a TimeAndDims key, as described in the documentatiion for compareUnsortedEncodedArrays(),
convert the unsorted encoded values to an array of sorted encoded values (i.e., sorted by their corresponding actual values)
|
void |
fillBitmapsFromUnsortedEncodedArray(EncodedTypeArray key,
int rowNum,
com.metamx.collections.bitmap.MutableBitmap[] bitmapIndexes,
com.metamx.collections.bitmap.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.
|
EncodedType |
getSortedEncodedValueFromUnsorted(EncodedType unsortedIntermediateValue)
Given an encoded value that was ordered by time of ingestion, return the equivalent
encoded value ordered by associated actual value.
|
Indexed<ActualType> |
getSortedIndexedValues()
Returns an indexed structure of this dimension's sorted actual values.
|
int |
getUnsortedEncodedArrayHashCode(EncodedTypeArray 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.
|
Object |
makeColumnValueSelector(DimensionSpec spec,
IncrementalIndexStorageAdapter.EntryHolder currEntry,
IncrementalIndex.DimensionDesc desc)
Return an object used to read rows from a StorageAdapter's Cursor.
|
ValueMatcher |
makeIndexingValueMatcher(Comparable matchValue,
IncrementalIndexStorageAdapter.EntryHolder holder,
int dimIndex)
Return a ValueMatcher that accepts an EntryHolder containing the current TimeAndDims key and the array index of this
indexer's dimension within the TimeAndDims key.
|
ValueMatcher |
makeIndexingValueMatcher(DruidPredicateFactory predicateFactory,
IncrementalIndexStorageAdapter.EntryHolder holder,
int dimIndex)
Return a ValueMatcher that accepts an EntryHolder containing the current TimeAndDims key and the array index of this
indexer's dimension within the TimeAndDims key.
|
EncodedTypeArray |
processRowValsToUnsortedEncodedArray(Object dimValues)
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.
|
EncodedTypeArray processRowValsToUnsortedEncodedArray(Object dimValues)
dimValues - Single row val to processEncodedType getSortedEncodedValueFromUnsorted(EncodedType unsortedIntermediateValue)
unsortedIntermediateValue - value to convertEncodedType getUnsortedEncodedValueFromSorted(EncodedType sortedIntermediateValue)
sortedIntermediateValue - value to convertIndexed<ActualType> getSortedIndexedValues()
ActualType getMinValue()
ActualType getMaxValue()
int getCardinality()
Object makeColumnValueSelector(DimensionSpec spec, IncrementalIndexStorageAdapter.EntryHolder 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 IncrementalIndexint compareUnsortedEncodedArrays(EncodedTypeArray lhs, EncodedTypeArray rhs)
lhs - dimension value array from a TimeAndDims keyrhs - dimension value array from a TimeAndDims keyboolean checkUnsortedEncodedArraysEqual(EncodedTypeArray lhs, EncodedTypeArray rhs)
lhs - dimension value array from a TimeAndDims keyrhs - dimension value array from a TimeAndDims keyint getUnsortedEncodedArrayHashCode(EncodedTypeArray key)
key - dimension value array from a TimeAndDims keyObject convertUnsortedEncodedArrayToActualArrayOrList(EncodedTypeArray key, boolean asList)
key - dimension value array from a TimeAndDims keyasList - if true, return an array; if false, return a listEncodedTypeArray convertUnsortedEncodedArrayToSortedEncodedArray(EncodedTypeArray key)
key - dimension value array from a TimeAndDims keyvoid fillBitmapsFromUnsortedEncodedArray(EncodedTypeArray key, int rowNum, com.metamx.collections.bitmap.MutableBitmap[] bitmapIndexes, com.metamx.collections.bitmap.BitmapFactory factory)
key - dimension value array from a TimeAndDims keyrowNum - current row numberbitmapIndexes - array of bitmaps, indexed by integer dimension valuefactory - bitmap factoryValueMatcher makeIndexingValueMatcher(Comparable matchValue, IncrementalIndexStorageAdapter.EntryHolder holder, int dimIndex)
matchValue - value to match onholder - holds the current TimeAndDims key during row iterationdimIndex - the array index of this indexer's dimension within the TimeAndDims keyValueMatcher makeIndexingValueMatcher(DruidPredicateFactory predicateFactory, IncrementalIndexStorageAdapter.EntryHolder holder, int dimIndex)
predicateFactory - Factory object that can generate predicates for each supported dimension typeholder - holds the current TimeAndDims key during row iterationdimIndex - the array index of this indexer's dimension within the TimeAndDims keyCopyright © 2011–2016. All rights reserved.