Package org.apache.druid.segment
Class StringDimensionMergerV9
java.lang.Object
org.apache.druid.segment.DictionaryEncodedColumnMerger<String>
org.apache.druid.segment.StringDimensionMergerV9
- All Implemented Interfaces:
DimensionMerger,DimensionMergerV9
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassWrite spatial indexes for string columns that have themNested classes/interfaces inherited from class org.apache.druid.segment.DictionaryEncodedColumnMerger
DictionaryEncodedColumnMerger.ConvertingBitmapValues, DictionaryEncodedColumnMerger.ExtendedIndexesMerger, DictionaryEncodedColumnMerger.IdConversionSerializer, DictionaryEncodedColumnMerger.IndexSeeker, DictionaryEncodedColumnMerger.IndexSeekerWithConversion, DictionaryEncodedColumnMerger.IndexSeekerWithoutConversion, DictionaryEncodedColumnMerger.PersistedIdConversion, DictionaryEncodedColumnMerger.PersistedIdConversions -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<Pair<Integer, com.google.common.collect.PeekingIterator<String>>> Fields inherited from class org.apache.druid.segment.DictionaryEncodedColumnMerger
adapters, bitmapWriter, capabilities, cardinality, closer, dictionaryMergeIterator, dictionarySize, dictionaryWriter, dimConversions, dimensionName, encodedValueSerializer, firstDictionaryValue, hasNull, indexSpec, nullRowsBitmap, outputName, persistedIdConversions, progress, rowCount, segmentBaseDir, segmentWriteOutMedium, writeDictionary -
Constructor Summary
ConstructorsConstructorDescriptionStringDimensionMergerV9(String dimensionName, String outputName, IndexSpec indexSpec, SegmentWriteOutMedium segmentWriteOutMedium, ColumnCapabilities capabilities, ProgressIndicator progress, File segmentBaseDir, Closer closer) -
Method Summary
Modifier and TypeMethodDescriptionvoidattachParent(DimensionMergerV9 parent, List<IndexableAdapter> projectionAdapters) Attaches theDimensionMergerV9of a "projection" parent column so that stuff like value dictionaries can be shared between parent and child.protected StringcoerceValue(String value) protected Comparator<Pair<Integer, com.google.common.collect.PeekingIterator<String>>> protected ObjectStrategy<String> Return a ColumnDescriptor containing ColumnPartSerde objects appropriate for this DimensionMerger's value metadata, sequence of row values, and index structures.protected DictionaryWriter<String> makeDictionaryWriter(String fileName) Methods inherited from class org.apache.druid.segment.DictionaryEncodedColumnMerger
convertSortedSegmentRowValuesToMergedRowValues, hasOnlyNulls, markAsParent, mergeBitmaps, processMergedRow, setupEncodedValueWriter, toIndexSeekers, writeDictionary, writeIndexes, writeMergedValueDictionary
-
Field Details
-
DICTIONARY_MERGING_COMPARATOR
public static final Comparator<Pair<Integer,com.google.common.collect.PeekingIterator<String>>> DICTIONARY_MERGING_COMPARATOR
-
-
Constructor Details
-
StringDimensionMergerV9
public StringDimensionMergerV9(String dimensionName, String outputName, IndexSpec indexSpec, SegmentWriteOutMedium segmentWriteOutMedium, ColumnCapabilities capabilities, ProgressIndicator progress, File segmentBaseDir, Closer closer) - Parameters:
dimensionName- column nameoutputName- output smoosh file name. if this is a base table column, it will be the equivalent to name, however if this merger is for a projection, this will be prefixed with the projection name so that multiple projections can store the same column name at different smoosh file "paths"indexSpec- segment level storage options such as compression format and bitmap typesegmentWriteOutMedium- temporary storage location to stage segment outputs before finalizing into the segmentcapabilities- options for writing the column such as if we should write bitmap or spatial indexesprogress- hook to update status of what this merger is doing during segment persist and mergingcloser- resource closer if this merger needs to attach any closables that should be cleaned up when the segment is finished writing
-
-
Method Details
-
getDictionaryMergingComparator
protected Comparator<Pair<Integer,com.google.common.collect.PeekingIterator<String>>> getDictionaryMergingComparator()- Specified by:
getDictionaryMergingComparatorin classDictionaryEncodedColumnMerger<String>
-
getNullDimValue
- Specified by:
getNullDimValuein classDictionaryEncodedColumnMerger<String>
-
getObjectStrategy
- Specified by:
getObjectStrategyin classDictionaryEncodedColumnMerger<String>
-
coerceValue
- Specified by:
coerceValuein classDictionaryEncodedColumnMerger<String>
-
makeDictionaryWriter
- Overrides:
makeDictionaryWriterin classDictionaryEncodedColumnMerger<String>
-
getExtendedIndexesMerger
- Overrides:
getExtendedIndexesMergerin classDictionaryEncodedColumnMerger<String>
-
makeColumnDescriptor
Description copied from interface:DimensionMergerV9Return a ColumnDescriptor containing ColumnPartSerde objects appropriate for this DimensionMerger's value metadata, sequence of row values, and index structures.- Returns:
- ColumnDescriptor that IndexMergerV9 will use to build a column.
-
attachParent
public void attachParent(DimensionMergerV9 parent, List<IndexableAdapter> projectionAdapters) throws IOException Description copied from interface:DimensionMergerV9Attaches theDimensionMergerV9of a "projection" parent column so that stuff like value dictionaries can be shared between parent and child. This method is called during merging instead ofDimensionMerger.writeMergedValueDictionary(List)if the parent column exists.- Throws:
IOException- See Also:
-