Package org.apache.druid.segment.nested
Class NestedDataColumnSerializerV4
- java.lang.Object
-
- org.apache.druid.segment.nested.NestedDataColumnSerializerV4
-
- All Implemented Interfaces:
GenericColumnSerializer<StructuredData>,Serializer
public class NestedDataColumnSerializerV4 extends Object implements GenericColumnSerializer<StructuredData>
-
-
Field Summary
Fields Modifier and Type Field Description static StringDOUBLE_DICTIONARY_FILE_NAMEstatic StringLONG_DICTIONARY_FILE_NAMEstatic StringNESTED_FIELD_PREFIXstatic StringNULL_BITMAP_FILE_NAMEstatic StringRAW_FILE_NAMEstatic StringSTRING_DICTIONARY_FILE_NAME
-
Constructor Summary
Constructors Constructor Description NestedDataColumnSerializerV4(String name, IndexSpec indexSpec, SegmentWriteOutMedium segmentWriteOutMedium, Closer closer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringgetInternalFileName(String fileNameBase, String field)longgetSerializedSize()Returns the number of bytes, that this Serializer will write to the output _channel_ (not smoosher) on aSerializer.writeTo(java.nio.channels.WritableByteChannel, org.apache.druid.java.util.common.io.smoosh.FileSmoosher)call.voidopen()voidserialize(ColumnValueSelector<? extends StructuredData> selector)voidserializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles)voidserializeFields(SortedMap<String,FieldTypeInfo.MutableTypeSet> fields)voidwriteTo(WritableByteChannel channel, FileSmoosher smoosher)Writes serialized form of this object to the given channel.
-
-
-
Field Detail
-
STRING_DICTIONARY_FILE_NAME
public static final String STRING_DICTIONARY_FILE_NAME
- See Also:
- Constant Field Values
-
LONG_DICTIONARY_FILE_NAME
public static final String LONG_DICTIONARY_FILE_NAME
- See Also:
- Constant Field Values
-
DOUBLE_DICTIONARY_FILE_NAME
public static final String DOUBLE_DICTIONARY_FILE_NAME
- See Also:
- Constant Field Values
-
RAW_FILE_NAME
public static final String RAW_FILE_NAME
- See Also:
- Constant Field Values
-
NULL_BITMAP_FILE_NAME
public static final String NULL_BITMAP_FILE_NAME
- See Also:
- Constant Field Values
-
NESTED_FIELD_PREFIX
public static final String NESTED_FIELD_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NestedDataColumnSerializerV4
public NestedDataColumnSerializerV4(String name, IndexSpec indexSpec, SegmentWriteOutMedium segmentWriteOutMedium, Closer closer)
-
-
Method Detail
-
open
public void open() throws IOException- Specified by:
openin interfaceGenericColumnSerializer<StructuredData>- Throws:
IOException
-
serializeFields
public void serializeFields(SortedMap<String,FieldTypeInfo.MutableTypeSet> fields) throws IOException
- Throws:
IOException
-
serializeDictionaries
public void serializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles) throws IOException
- Throws:
IOException
-
serialize
public void serialize(ColumnValueSelector<? extends StructuredData> selector) throws IOException
- Specified by:
serializein interfaceGenericColumnSerializer<StructuredData>- Throws:
IOException
-
getSerializedSize
public long getSerializedSize() throws IOExceptionDescription copied from interface:SerializerReturns the number of bytes, that this Serializer will write to the output _channel_ (not smoosher) on aSerializer.writeTo(java.nio.channels.WritableByteChannel, org.apache.druid.java.util.common.io.smoosh.FileSmoosher)call.- Specified by:
getSerializedSizein interfaceSerializer- Throws:
IOException
-
writeTo
public void writeTo(WritableByteChannel channel, FileSmoosher smoosher) throws IOException
Description copied from interface:SerializerWrites serialized form of this object to the given channel. If parallel data streams are needed, they could be created with the provided smoosher.- Specified by:
writeToin interfaceSerializer- Throws:
IOException
-
-