public class LongDimensionHandler extends Object implements DimensionHandler<Long,Long,Long>
| Constructor and Description |
|---|
LongDimensionHandler(String dimensionName) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareSortedEncodedKeyComponents(Long lhs,
Long 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.
|
Long |
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(Long 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.
|
Closeable |
getSubColumn(Column column)
Given a Column, return a type-specific object that can be used to retrieve row values.
|
DimensionIndexer<Long,Long,Long> |
makeIndexer()
Creates a new DimensionIndexer, a per-dimension object responsible for processing ingested rows in-memory, used
by the IncrementalIndex.
|
DimensionMergerLegacy<Long> |
makeLegacyMerger(IndexSpec indexSpec,
File outDir,
IOPeon ioPeon,
ColumnCapabilities capabilities,
ProgressIndicator progress)
Creates a new DimensionMergerLegacy, a per-dimension object responsible for merging indexes/row data across
segments and building the on-disk representation of a dimension.
|
DimensionMergerV9<Long> |
makeMerger(IndexSpec indexSpec,
File outDir,
IOPeon ioPeon,
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(Long lhs,
Long rhs,
Indexed<Long> lhsEncodings,
Indexed<Long> 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 LongDimensionHandler(String dimensionName)
public String getDimensionName()
DimensionHandlergetDimensionName in interface DimensionHandler<Long,Long,Long>public DimensionIndexer<Long,Long,Long> makeIndexer()
DimensionHandlerDimensionIndexer interface for more information.makeIndexer in interface DimensionHandler<Long,Long,Long>public DimensionMergerV9<Long> makeMerger(IndexSpec indexSpec, File outDir, IOPeon ioPeon, ColumnCapabilities capabilities, ProgressIndicator progress) throws IOException
DimensionHandlerDimensionMergerV9 interface for more information.makeMerger in interface DimensionHandler<Long,Long,Long>indexSpec - Specification object for the index mergeoutDir - Location to store files generated by the merging processioPeon - ioPeon object passed in by IndexMerger, manages files created by the merging processcapabilities - The ColumnCapabilities of the dimension represented by this DimensionHandlerprogress - ProgressIndicator used by the merging processIOExceptionpublic DimensionMergerLegacy<Long> makeLegacyMerger(IndexSpec indexSpec, File outDir, IOPeon ioPeon, ColumnCapabilities capabilities, ProgressIndicator progress) throws IOException
DimensionHandlerDimensionMergerLegacy interface for more information.makeLegacyMerger in interface DimensionHandler<Long,Long,Long>indexSpec - Specification object for the index mergeoutDir - Location to store files generated by the merging processioPeon - ioPeon object passed in by IndexMerger, manages files created by the merging processcapabilities - The ColumnCapabilities of the dimension represented by this DimensionHandlerprogress - ProgressIndicator used by the merging processIOExceptionpublic int getLengthOfEncodedKeyComponent(Long dimVals)
DimensionHandlergetLengthOfEncodedKeyComponent in interface DimensionHandler<Long,Long,Long>dimVals - Values for this dimension from a rowpublic int compareSortedEncodedKeyComponents(Long lhs, Long rhs)
DimensionHandlercompareSortedEncodedKeyComponents in interface DimensionHandler<Long,Long,Long>lhs - key component from a rowrhs - key component from a rowpublic void validateSortedEncodedKeyComponents(Long lhs, Long rhs, Indexed<Long> lhsEncodings, Indexed<Long> rhsEncodings) throws SegmentValidationException
DimensionHandlervalidateSortedEncodedKeyComponents in interface DimensionHandler<Long,Long,Long>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<Long,Long,Long>column - Column for this dimension from a QueryableIndexpublic Long getEncodedKeyComponentFromColumn(Closeable column, int currRow)
DimensionHandlergetEncodedKeyComponentFromColumn in interface DimensionHandler<Long,Long,Long>column - Column for this dimension from a QueryableIndexcurrRow - The index of the row to retrieveCopyright © 2011–2017. All rights reserved.