Package org.apache.druid.segment.nested
Class NestedDataComplexTypeSerde
- java.lang.Object
-
- org.apache.druid.segment.serde.ComplexMetricSerde
-
- org.apache.druid.segment.nested.NestedDataComplexTypeSerde
-
public class NestedDataComplexTypeSerde extends ComplexMetricSerde
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNestedDataComplexTypeSerde.NestedColumnFormatV4
-
Field Summary
Fields Modifier and Type Field Description static NestedDataComplexTypeSerdeINSTANCEstatic com.fasterxml.jackson.databind.ObjectMapperOBJECT_MAPPERstatic StringTYPE_NAME
-
Constructor Summary
Constructors Constructor Description NestedDataComplexTypeSerde()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeserializeColumn(ByteBuffer buffer, ColumnBuilder builder)ComplexMetricSerde.deserializeColumn(ByteBuffer, ColumnBuilder, ColumnConfig)should be used instead of this.voiddeserializeColumn(ByteBuffer buffer, ColumnBuilder builder, ColumnConfig columnConfig)Deserializes a ByteBuffer and adds it to the ColumnBuilder.ComplexMetricExtractorgetExtractor()ObjectStrategygetObjectStrategy()This is deprecated because its usage is going to be removed from the code.StringgetTypeName()<T extends Comparable<T>>
TypeStrategy<T>getTypeStrategy()Get aTypeStrategyto assist with writing individual complex values to aByteBuffer.-
Methods inherited from class org.apache.druid.segment.serde.ComplexMetricSerde
fromBytes, getSerializer, inputSizeFn, toBytes
-
-
-
-
Field Detail
-
TYPE_NAME
public static final String TYPE_NAME
- See Also:
- Constant Field Values
-
OBJECT_MAPPER
public static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
-
INSTANCE
public static final NestedDataComplexTypeSerde INSTANCE
-
-
Method Detail
-
getTypeName
public String getTypeName()
- Specified by:
getTypeNamein classComplexMetricSerde
-
getExtractor
public ComplexMetricExtractor getExtractor()
- Specified by:
getExtractorin classComplexMetricSerde
-
deserializeColumn
public void deserializeColumn(ByteBuffer buffer, ColumnBuilder builder)
Description copied from class:ComplexMetricSerdeComplexMetricSerde.deserializeColumn(ByteBuffer, ColumnBuilder, ColumnConfig)should be used instead of this. This method is left for backward compatibility.- Specified by:
deserializeColumnin classComplexMetricSerde
-
deserializeColumn
public void deserializeColumn(ByteBuffer buffer, ColumnBuilder builder, ColumnConfig columnConfig)
Description copied from class:ComplexMetricSerdeDeserializes a ByteBuffer and adds it to the ColumnBuilder. This method allows for the ComplexMetricSerde to implement it's own versioning scheme to allow for changes of binary format in a forward-compatible manner.- Overrides:
deserializeColumnin classComplexMetricSerde- Parameters:
buffer- the buffer to deserializebuilder- ColumnBuilder to add the column tocolumnConfig- ColumnConfiguration used during deserialization
-
getObjectStrategy
public ObjectStrategy getObjectStrategy()
Description copied from class:ComplexMetricSerdeThis is deprecated because its usage is going to be removed from the code.It was introduced before deserializeColumn() existed. This method creates the assumption that Druid knows how to interpret the actual column representation of the data, but I would much prefer that the ComplexMetricSerde objects be in charge of creating and interpreting the whole column, which is what deserializeColumn lets them do.
- Specified by:
getObjectStrategyin classComplexMetricSerde- Returns:
- an ObjectStrategy as used by GenericIndexed
-
getTypeStrategy
public <T extends Comparable<T>> TypeStrategy<T> getTypeStrategy()
Description copied from class:ComplexMetricSerdeGet aTypeStrategyto assist with writing individual complex values to aByteBuffer.- Overrides:
getTypeStrategyin classComplexMetricSerde- See Also:
TypeStrategy
-
-