public abstract class NestedCommonFormatColumnSerializer extends Object implements GenericColumnSerializer<StructuredData>
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:- single type double columns,
- single type long columns,
- single type string columns,
- single type array columns of string, long, double, and mixed type columns,
- nested columns,
- legacy nested column format created by
{@link org.apache.druid.segment.NestedDataColumnIndexer} and
{@link org.apache.druid.segment.NestedDataColumnMerger}| Modifier and Type | Field and Description |
|---|---|
static String |
ARRAY_DICTIONARY_FILE_NAME |
static String |
ARRAY_ELEMENT_BITMAP_INDEX_FILE_NAME |
static String |
ARRAY_ELEMENT_DICTIONARY_FILE_NAME |
static String |
BITMAP_INDEX_FILE_NAME |
static String |
DOUBLE_DICTIONARY_FILE_NAME |
static String |
DOUBLE_VALUE_COLUMN_FILE_NAME |
static String |
ENCODED_VALUE_COLUMN_FILE_NAME |
static String |
LONG_DICTIONARY_FILE_NAME |
static String |
LONG_VALUE_COLUMN_FILE_NAME |
static String |
NESTED_FIELD_PREFIX |
static String |
NULL_BITMAP_FILE_NAME |
static String |
RAW_FILE_NAME |
static String |
STRING_DICTIONARY_FILE_NAME |
static byte |
V0 |
| Constructor and Description |
|---|
NestedCommonFormatColumnSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected ByteBuffer |
computeFilenameBytes() |
abstract String |
getColumnName() |
abstract DictionaryIdLookup |
getGlobalLookup() |
static String |
getInternalFileName(String fileNameBase,
String field)
Nested field columns are stored in separate
|
abstract boolean |
hasNulls() |
abstract void |
openDictionaryWriter() |
abstract void |
serializeDictionaries(Iterable<String> strings,
Iterable<Long> longs,
Iterable<Double> doubles,
Iterable<int[]> arrays) |
void |
serializeFields(SortedMap<String,FieldTypeInfo.MutableTypeSet> fields) |
protected void |
writeInternal(FileSmoosher smoosher,
Serializer serializer,
String fileName) |
protected void |
writeV0Header(WritableByteChannel channel,
ByteBuffer columnNameBuffer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitopen, serializegetSerializedSize, writeTopublic static final byte V0
public static final String STRING_DICTIONARY_FILE_NAME
public static final String LONG_DICTIONARY_FILE_NAME
public static final String DOUBLE_DICTIONARY_FILE_NAME
public static final String ARRAY_DICTIONARY_FILE_NAME
public static final String ARRAY_ELEMENT_DICTIONARY_FILE_NAME
public static final String ENCODED_VALUE_COLUMN_FILE_NAME
public static final String LONG_VALUE_COLUMN_FILE_NAME
public static final String DOUBLE_VALUE_COLUMN_FILE_NAME
public static final String BITMAP_INDEX_FILE_NAME
public static final String ARRAY_ELEMENT_BITMAP_INDEX_FILE_NAME
public static final String RAW_FILE_NAME
public static final String NULL_BITMAP_FILE_NAME
public static final String NESTED_FIELD_PREFIX
public abstract void openDictionaryWriter()
throws IOException
IOExceptionpublic void serializeFields(SortedMap<String,FieldTypeInfo.MutableTypeSet> fields) throws IOException
IOExceptionpublic abstract void serializeDictionaries(Iterable<String> strings, Iterable<Long> longs, Iterable<Double> doubles, Iterable<int[]> arrays) throws IOException
IOExceptionpublic abstract String getColumnName()
public abstract DictionaryIdLookup getGlobalLookup()
public abstract boolean hasNulls()
protected void writeInternal(FileSmoosher smoosher, Serializer serializer, String fileName) throws IOException
IOExceptionprotected void writeV0Header(WritableByteChannel channel, ByteBuffer columnNameBuffer) throws IOException
IOExceptionprotected ByteBuffer computeFilenameBytes()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.