Package org.apache.druid.segment.nested
Class ScalarDoubleColumnSerializer
java.lang.Object
org.apache.druid.segment.nested.NestedCommonFormatColumnSerializer
org.apache.druid.segment.nested.ScalarNestedCommonFormatColumnSerializer<Double>
org.apache.druid.segment.nested.ScalarDoubleColumnSerializer
- All Implemented Interfaces:
GenericColumnSerializer<StructuredData>,Serializer
Serializer for a
ScalarDoubleColumn-
Field Summary
Fields inherited from class org.apache.druid.segment.nested.ScalarNestedCommonFormatColumnSerializer
closedForWrite, closer, columnFormatSpec, columnNameBytes, dictionaryIdLookup, dictionarySerialized, dictionaryWriter, hasNulls, intermediateValueWriter, log, name, segmentWriteOutMedium, writeDictionaryFields inherited from class org.apache.druid.segment.nested.NestedCommonFormatColumnSerializer
NESTED_FIELD_PREFIX, RAW_FILE_NAME, V0 -
Constructor Summary
ConstructorsConstructorDescriptionScalarDoubleColumnSerializer(String name, NestedCommonFormatColumnFormatSpec columnFormatSpec, SegmentWriteOutMedium segmentWriteOutMedium, Closer closer) -
Method Summary
Modifier and TypeMethodDescriptionintvoidopenDictionaryWriter(File segmentBaseDir) protected voidCalled duringScalarNestedCommonFormatColumnSerializer.open()to allow opening any separate type specific value column serializersprotected intprocessValue(Object rawValue) Called duringScalarNestedCommonFormatColumnSerializer.serialize(ColumnValueSelector)to convert value to dictionary id.voidserializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles, Iterable<int[]> arrays) protected voidwriteDictionaryFile(SegmentFileBuilder fileBuilder) protected voidwriteValueColumn(SegmentFileBuilder fileBuilder) Called duringSerializer.writeTo(WritableByteChannel, SegmentFileBuilder)to allow any type specific value column serializers to use theSegmentFileBuilderto write stuff to places.Methods inherited from class org.apache.druid.segment.nested.ScalarNestedCommonFormatColumnSerializer
getColumnName, getDictionaryIdLookup, getSerializedSize, hasNulls, open, serialize, setDictionaryIdLookup, writeToMethods inherited from class org.apache.druid.segment.nested.NestedCommonFormatColumnSerializer
computeFilenameBytes, copyFromTempSmoosh, serializeFields, writeInternal, writeV0Header
-
Constructor Details
-
ScalarDoubleColumnSerializer
public ScalarDoubleColumnSerializer(String name, NestedCommonFormatColumnFormatSpec columnFormatSpec, SegmentWriteOutMedium segmentWriteOutMedium, Closer closer)
-
-
Method Details
-
processValue
Description copied from class:ScalarNestedCommonFormatColumnSerializerCalled duringScalarNestedCommonFormatColumnSerializer.serialize(ColumnValueSelector)to convert value to dictionary id.Implementations may optionally also serialize the value to a type specific value column if they opened one with
ScalarNestedCommonFormatColumnSerializer.openValueColumnSerializer(), or do whatever else is useful to do while handling a single row value.- Specified by:
processValuein classScalarNestedCommonFormatColumnSerializer<Double>- Throws:
IOException
-
openDictionaryWriter
- Specified by:
openDictionaryWriterin classNestedCommonFormatColumnSerializer- Throws:
IOException
-
openValueColumnSerializer
Description copied from class:ScalarNestedCommonFormatColumnSerializerCalled duringScalarNestedCommonFormatColumnSerializer.open()to allow opening any separate type specific value column serializers- Specified by:
openValueColumnSerializerin classScalarNestedCommonFormatColumnSerializer<Double>- Throws:
IOException
-
serializeDictionaries
public void serializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles, Iterable<int[]> arrays) throws IOException - Specified by:
serializeDictionariesin classNestedCommonFormatColumnSerializer- Throws:
IOException
-
writeValueColumn
Description copied from class:ScalarNestedCommonFormatColumnSerializerCalled duringSerializer.writeTo(WritableByteChannel, SegmentFileBuilder)to allow any type specific value column serializers to use theSegmentFileBuilderto write stuff to places.- Specified by:
writeValueColumnin classScalarNestedCommonFormatColumnSerializer<Double>- Throws:
IOException
-
writeDictionaryFile
- Specified by:
writeDictionaryFilein classScalarNestedCommonFormatColumnSerializer<Double>- Throws:
IOException
-
getCardinality
public int getCardinality()- Specified by:
getCardinalityin classScalarNestedCommonFormatColumnSerializer<Double>
-