public class StringDimensionHandler extends Object implements DimensionHandler<Integer,int[],String>
| Constructor and Description |
|---|
StringDimensionHandler(String dimensionName,
DimensionSchema.MultiValueHandling multiValueHandling) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareSortedEncodedKeyComponents(int[] lhs,
int[] rhs)
Given two key components representing sorted encoded row value(s), return the result of their comparison.
|
String |
getDimensionName()
Get the name of the column associated with this handler.
|
int[] |
getEncodedKeyComponentFromColumn(Closeable column,
int currRow)
Given a subcolumn from getSubColumn, and the index of the current row, retrieve a dimension's values
from a row as an EncodedKeyComponentType.
|
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. |
Closeable |
getSubColumn(Column column)
Given a Column, return a type-specific object that can be used to retrieve row values.
|
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)
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.
|
void |
validateSortedEncodedKeyComponents(int[] lhs,
int[] rhs,
Indexed<String> lhsEncodings,
Indexed<String> rhsEncodings)
Given two key components representing sorted encoded row value(s), check that the two key components
have the same encoded values, or if the encoded values differ, that they translate into the same actual values,
using the mappings provided by lhsEncodings and rhsEncodings (if applicable).
|
public StringDimensionHandler(String dimensionName, DimensionSchema.MultiValueHandling multiValueHandling)
public String getDimensionName()
DimensionHandlergetDimensionName in interface DimensionHandler<Integer,int[],String>public DimensionSchema.MultiValueHandling getMultivalueHandling()
DimensionHandlerDimensionSchema.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)
DimensionHandlergetLengthOfEncodedKeyComponent in interface DimensionHandler<Integer,int[],String>dimVals - Values for this dimension from a rowpublic int compareSortedEncodedKeyComponents(int[] lhs,
int[] rhs)
DimensionHandlercompareSortedEncodedKeyComponents in interface DimensionHandler<Integer,int[],String>lhs - key component from a rowrhs - key component from a rowpublic void validateSortedEncodedKeyComponents(int[] lhs,
int[] rhs,
Indexed<String> lhsEncodings,
Indexed<String> rhsEncodings)
throws SegmentValidationException
DimensionHandlervalidateSortedEncodedKeyComponents in interface DimensionHandler<Integer,int[],String>lhs - key component from a rowrhs - key component from a rowlhsEncodings - encoding lookup from lhs's segment, null if not applicable for this dimension's typerhsEncodings - encoding lookup from rhs's segment, null if not applicable for this dimension's typeSegmentValidationExceptionpublic Closeable getSubColumn(Column column)
DimensionHandlergetSubColumn in interface DimensionHandler<Integer,int[],String>column - Column for this dimension from a QueryableIndexpublic int[] getEncodedKeyComponentFromColumn(Closeable column, int currRow)
DimensionHandlergetEncodedKeyComponentFromColumn in interface DimensionHandler<Integer,int[],String>column - Column for this dimension from a QueryableIndexcurrRow - The index of the row to retrievepublic DimensionIndexer<Integer,int[],String> makeIndexer()
DimensionHandlerDimensionIndexer interface for more information.makeIndexer in interface DimensionHandler<Integer,int[],String>public DimensionMergerV9 makeMerger(IndexSpec indexSpec, SegmentWriteOutMedium segmentWriteOutMedium, ColumnCapabilities capabilities, ProgressIndicator progress)
DimensionHandlerDimensionMergerV9 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–2018. All rights reserved.