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
public class ScalarDoubleColumnSerializer extends ScalarNestedCommonFormatColumnSerializer<Double>
Serializer for aScalarDoubleColumn
-
-
Field Summary
-
Fields inherited from class org.apache.druid.segment.nested.ScalarNestedCommonFormatColumnSerializer
closedForWrite, closer, columnNameBytes, dictionaryIdLookup, dictionarySerialized, dictionaryWriter, hasNulls, indexSpec, intermediateValueWriter, log, name, segmentWriteOutMedium
-
Fields inherited from class org.apache.druid.segment.nested.NestedCommonFormatColumnSerializer
ARRAY_DICTIONARY_FILE_NAME, ARRAY_ELEMENT_BITMAP_INDEX_FILE_NAME, ARRAY_ELEMENT_DICTIONARY_FILE_NAME, BITMAP_INDEX_FILE_NAME, DOUBLE_DICTIONARY_FILE_NAME, DOUBLE_VALUE_COLUMN_FILE_NAME, ENCODED_VALUE_COLUMN_FILE_NAME, LONG_DICTIONARY_FILE_NAME, LONG_VALUE_COLUMN_FILE_NAME, NESTED_FIELD_PREFIX, NULL_BITMAP_FILE_NAME, RAW_FILE_NAME, STRING_DICTIONARY_FILE_NAME, V0
-
-
Constructor Summary
Constructors Constructor Description ScalarDoubleColumnSerializer(String name, IndexSpec indexSpec, SegmentWriteOutMedium segmentWriteOutMedium, Closer closer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
openDictionaryWriter()
protected void
openValueColumnSerializer()
Called duringScalarNestedCommonFormatColumnSerializer.open()
to allow opening any separate type specific value column serializersprotected int
processValue(Object rawValue)
Called duringScalarNestedCommonFormatColumnSerializer.serialize(ColumnValueSelector)
to convert value to dictionary id.void
serializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles, Iterable<int[]> arrays)
protected void
writeDictionaryFile(FileSmoosher smoosher)
protected void
writeValueColumn(FileSmoosher smoosher)
Called duringScalarNestedCommonFormatColumnSerializer.writeTo(WritableByteChannel, FileSmoosher)
to allow any type specific value column serializers to use theFileSmoosher
to write stuff to places.-
Methods inherited from class org.apache.druid.segment.nested.ScalarNestedCommonFormatColumnSerializer
getColumnName, getGlobalLookup, getSerializedSize, hasNulls, open, serialize, writeTo
-
Methods inherited from class org.apache.druid.segment.nested.NestedCommonFormatColumnSerializer
computeFilenameBytes, getInternalFileName, serializeFields, writeInternal, writeInternal, writeV0Header
-
-
-
-
Constructor Detail
-
ScalarDoubleColumnSerializer
public ScalarDoubleColumnSerializer(String name, IndexSpec indexSpec, SegmentWriteOutMedium segmentWriteOutMedium, Closer closer)
-
-
Method Detail
-
processValue
protected int processValue(@Nullable Object rawValue) throws IOException
Description copied from class:ScalarNestedCommonFormatColumnSerializer
Called 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:
processValue
in classScalarNestedCommonFormatColumnSerializer<Double>
- Throws:
IOException
-
openDictionaryWriter
public void openDictionaryWriter() throws IOException
- Specified by:
openDictionaryWriter
in classNestedCommonFormatColumnSerializer
- Throws:
IOException
-
openValueColumnSerializer
protected void openValueColumnSerializer() throws IOException
Description copied from class:ScalarNestedCommonFormatColumnSerializer
Called duringScalarNestedCommonFormatColumnSerializer.open()
to allow opening any separate type specific value column serializers- Specified by:
openValueColumnSerializer
in classScalarNestedCommonFormatColumnSerializer<Double>
- Throws:
IOException
-
serializeDictionaries
public void serializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles, Iterable<int[]> arrays) throws IOException
- Specified by:
serializeDictionaries
in classNestedCommonFormatColumnSerializer
- Throws:
IOException
-
writeValueColumn
protected void writeValueColumn(FileSmoosher smoosher) throws IOException
Description copied from class:ScalarNestedCommonFormatColumnSerializer
Called duringScalarNestedCommonFormatColumnSerializer.writeTo(WritableByteChannel, FileSmoosher)
to allow any type specific value column serializers to use theFileSmoosher
to write stuff to places.- Specified by:
writeValueColumn
in classScalarNestedCommonFormatColumnSerializer<Double>
- Throws:
IOException
-
writeDictionaryFile
protected void writeDictionaryFile(FileSmoosher smoosher) throws IOException
- Specified by:
writeDictionaryFile
in classScalarNestedCommonFormatColumnSerializer<Double>
- Throws:
IOException
-
-