Package org.apache.druid.segment.nested
Class NestedCommonFormatColumnSerializer
java.lang.Object
org.apache.druid.segment.nested.NestedCommonFormatColumnSerializer
- All Implemented Interfaces:
GenericColumnSerializer<StructuredData>,Serializer
- Direct Known Subclasses:
NestedDataColumnSerializer,ScalarNestedCommonFormatColumnSerializer,VariantColumnSerializer
public abstract class NestedCommonFormatColumnSerializer
extends Object
implements GenericColumnSerializer<StructuredData>
Basic serializer implementation for the
NestedCommonFormatColumn family of columns. The
AutoTypeColumnIndexer catalogs the types and fields present in the data it processes
using a StructuredDataProcessor. When persisting and merging segments, the
AutoTypeColumnMerger will choose the most appropriate serializer based on the data
which was processed as follows:- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ByteBufferprotected static voidcopyFromTempSmoosh(FileSmoosher smoosher, SmooshedFileMapper fileMapper) abstract Stringabstract DictionaryIdLookupabstract booleanhasNulls()abstract voidopenDictionaryWriter(File segmentBaseDir) abstract voidserializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles, Iterable<int[]> arrays) voidabstract voidsetDictionaryIdLookup(DictionaryIdLookup dictionaryIdLookup) protected voidwriteInternal(FileSmoosher smoosher, Serializer serializer, String fileName) static voidwriteV0Header(WritableByteChannel channel, ByteBuffer columnNameBuffer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.segment.GenericColumnSerializer
open, serializeMethods inherited from interface org.apache.druid.segment.serde.Serializer
getSerializedSize, writeTo
-
Field Details
-
V0
public static final byte V0- See Also:
-
RAW_FILE_NAME
- See Also:
-
NESTED_FIELD_PREFIX
- See Also:
-
-
Constructor Details
-
NestedCommonFormatColumnSerializer
public NestedCommonFormatColumnSerializer()
-
-
Method Details
-
openDictionaryWriter
- Throws:
IOException
-
serializeFields
public void serializeFields(SortedMap<String, FieldTypeInfo.MutableTypeSet> fields) throws IOException- Throws:
IOException
-
serializeDictionaries
public abstract void serializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles, Iterable<int[]> arrays) throws IOException - Throws:
IOException
-
getColumnName
-
getDictionaryIdLookup
-
setDictionaryIdLookup
-
hasNulls
public abstract boolean hasNulls() -
writeInternal
protected void writeInternal(FileSmoosher smoosher, Serializer serializer, String fileName) throws IOException - Throws:
IOException
-
copyFromTempSmoosh
protected static void copyFromTempSmoosh(FileSmoosher smoosher, SmooshedFileMapper fileMapper) throws IOException - Throws:
IOException
-
writeV0Header
public static void writeV0Header(WritableByteChannel channel, ByteBuffer columnNameBuffer) throws IOException - Throws:
IOException
-
computeFilenameBytes
-