public class StringDimensionHandler extends Object implements DimensionHandler<Integer,int[],String>
Constructor and Description |
---|
StringDimensionHandler(String dimensionName,
DimensionSchema.MultiValueHandling multiValueHandling,
boolean hasBitmapIndexes,
boolean hasSpatialIndexes) |
Modifier and Type | Method and Description |
---|---|
String |
getDimensionName()
Get the name of the column associated with this handler.
|
Comparator<ColumnValueSelector> |
getEncodedValueSelectorComparator()
Returns a comparator that knows how to compare
ColumnValueSelector of the assumed dimension type,
corresponding to this DimensionHandler. |
int |
getLengthOfEncodedKeyComponent(int[] dimVals)
Given an key component representing a single set of row value(s) for this dimension as an Object,
return the length of the key component after appropriate type-casting.
|
DimensionSchema.MultiValueHandling |
getMultivalueHandling()
Get
DimensionSchema.MultiValueHandling for the column associated with this handler. |
DimensionIndexer<Integer,int[],String> |
makeIndexer()
Creates a new DimensionIndexer, a per-dimension object responsible for processing ingested rows in-memory, used
by the IncrementalIndex.
|
DimensionMergerV9 |
makeMerger(IndexSpec indexSpec,
SegmentWriteOutMedium segmentWriteOutMedium,
ColumnCapabilities capabilities,
ProgressIndicator progress,
Closer closer)
Creates a new DimensionMergerV9, a per-dimension object responsible for merging indexes/row data across segments
and building the on-disk representation of a dimension.
|
SettableColumnValueSelector |
makeNewSettableEncodedValueSelector()
Creates and returns a new object of some implementation of
SettableColumnValueSelector , that corresponds
to the type of this DimensionHandler. |
public StringDimensionHandler(String dimensionName, DimensionSchema.MultiValueHandling multiValueHandling, boolean hasBitmapIndexes, boolean hasSpatialIndexes)
public String getDimensionName()
DimensionHandler
getDimensionName
in interface DimensionHandler<Integer,int[],String>
public DimensionSchema.MultiValueHandling getMultivalueHandling()
DimensionHandler
DimensionSchema.MultiValueHandling
for the column associated with this handler.
Only string columns can have DimensionSchema.MultiValueHandling
currently.getMultivalueHandling
in interface DimensionHandler<Integer,int[],String>
public int getLengthOfEncodedKeyComponent(int[] dimVals)
DimensionHandler
getLengthOfEncodedKeyComponent
in interface DimensionHandler<Integer,int[],String>
dimVals
- Values for this dimension from a rowpublic Comparator<ColumnValueSelector> getEncodedValueSelectorComparator()
DimensionHandler
ColumnValueSelector
of the assumed dimension type,
corresponding to this DimensionHandler. E. g. StringDimensionHandler
returns a comparator, that compares
ColumnValueSelector
s as DimensionSelector
s.
The comparison rules used by this method should match the rules used by
DimensionIndexer.compareUnsortedEncodedKeyComponents(EncodedKeyComponentType, EncodedKeyComponentType)
, otherwise incorrect ordering/merging of rows
can occur during ingestion, causing issues such as imperfect rollup.getEncodedValueSelectorComparator
in interface DimensionHandler<Integer,int[],String>
public SettableColumnValueSelector makeNewSettableEncodedValueSelector()
DimensionHandler
SettableColumnValueSelector
, that corresponds
to the type of this DimensionHandler. E. g. LongDimensionHandler
returns SettableLongColumnValueSelector
, etc.makeNewSettableEncodedValueSelector
in interface DimensionHandler<Integer,int[],String>
public DimensionIndexer<Integer,int[],String> makeIndexer()
DimensionHandler
DimensionIndexer
interface for more information.makeIndexer
in interface DimensionHandler<Integer,int[],String>
public DimensionMergerV9 makeMerger(IndexSpec indexSpec, SegmentWriteOutMedium segmentWriteOutMedium, ColumnCapabilities capabilities, ProgressIndicator progress, Closer closer)
DimensionHandler
DimensionMergerV9
interface for more information.makeMerger
in interface DimensionHandler<Integer,int[],String>
indexSpec
- Specification object for the index mergesegmentWriteOutMedium
- this SegmentWriteOutMedium object could be used internally in the created merger, if neededcapabilities
- The ColumnCapabilities of the dimension represented by this DimensionHandlerprogress
- ProgressIndicator used by the merging processCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.