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 Instance Methods Concrete Methods Modifier and Type Method Description 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 the serialized form of this object.
-
-
-
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 the serialized form of this object. The entire object may be written to the provided channel, or the object may be split over the provided channel and files added to the {@link FileSmoosher], where additional channels can be created viaFileSmoosher.addWithSmooshedWriter(String, long). The latter approach is useful when the serialized form of the object is too large for a single smoosh container. At the time this javadoc was written, the max smoosh container size is limit to the maxByteBuffersize.- Specified by:
writeToin interfaceSerializer- Throws:
IOException
-
-