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 String
DOUBLE_DICTIONARY_FILE_NAME
static String
LONG_DICTIONARY_FILE_NAME
static String
NESTED_FIELD_PREFIX
static String
NULL_BITMAP_FILE_NAME
static String
RAW_FILE_NAME
static String
STRING_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 String
getInternalFileName(String fileNameBase, String field)
long
getSerializedSize()
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.void
open()
void
serialize(ColumnValueSelector<? extends StructuredData> selector)
void
serializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles)
void
serializeFields(SortedMap<String,FieldTypeInfo.MutableTypeSet> fields)
void
writeTo(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:
open
in 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:
serialize
in interfaceGenericColumnSerializer<StructuredData>
- Throws:
IOException
-
getSerializedSize
public long getSerializedSize() throws IOException
Description copied from interface:Serializer
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.- Specified by:
getSerializedSize
in interfaceSerializer
- Throws:
IOException
-
writeTo
public void writeTo(WritableByteChannel channel, FileSmoosher smoosher) throws IOException
Description copied from interface:Serializer
Writes 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:
writeTo
in interfaceSerializer
- Throws:
IOException
-
-