Package org.apache.druid.segment
Class IndexSpec
java.lang.Object
org.apache.druid.segment.IndexSpec
IndexSpec defines segment storage format options to be used at indexing time,
such as bitmap type, and column compression formats.
IndexSpec is specified as part of the TuningConfig for the corresponding index task. Fields which are not explicitly
defined by the operator default to null values, callers must call getEffectiveSpec() to fill in these null
values, which will replace nulls first with any system defaults defined in getDefault() falling back to
hard coded defaults.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionIndexSpec(BitmapSerdeFactory bitmapSerdeFactory, CompressionStrategy metadataCompression, CompressionStrategy dimensionCompression, StringEncodingStrategy stringDictionaryEncoding, CompressionStrategy metricCompression, CompressionFactory.LongEncodingStrategy longEncoding, CompressionStrategy complexMetricCompression, CompressionStrategy jsonCompression, SegmentizerFactory segmentLoader, NestedCommonFormatColumnFormatSpec autoColumnFormatSpec, StringColumnFormatSpec stringColumnFormatSpec) Creates an IndexSpec with the given storage format settings. -
Method Summary
Modifier and TypeMethodDescriptionstatic IndexSpec.Builderbuilder()booleanstatic IndexSpecPopulate all null fields ofIndexSpec, first fromgetDefault()and finally falling back to hard coded defaults if no overrides are defined.Deprecated.inthashCode()toString()
-
Constructor Details
-
IndexSpec
public IndexSpec(@Nullable BitmapSerdeFactory bitmapSerdeFactory, @Nullable CompressionStrategy metadataCompression, @Nullable CompressionStrategy dimensionCompression, @Nullable StringEncodingStrategy stringDictionaryEncoding, @Nullable CompressionStrategy metricCompression, @Nullable CompressionFactory.LongEncodingStrategy longEncoding, @Nullable CompressionStrategy complexMetricCompression, @Deprecated @Nullable CompressionStrategy jsonCompression, @Nullable SegmentizerFactory segmentLoader, @Nullable NestedCommonFormatColumnFormatSpec autoColumnFormatSpec, @Nullable StringColumnFormatSpec stringColumnFormatSpec) Creates an IndexSpec with the given storage format settings.- Parameters:
bitmapSerdeFactory- type of bitmap to use (e.g. roaring or concise), null to use the default. Defaults to the bitmap type specified by the (deprecated) "druid.processing.bitmap.type" setting, or, if none was set, uses the default defined inBitmapSerdeupon callinggetEffectiveSpec()metadataCompression- compression format for v10 metadatadimensionCompression- compression format for dimension columns, null to use the default. Defaults toCompressionStrategy.DEFAULT_COMPRESSION_STRATEGYupon callinggetEffectiveSpec()stringDictionaryEncoding- encoding strategy for string dictionaries of dictionary encoded string columnsmetricCompression- compression format for primitive type metric columns, null to use the default. Defaults toCompressionStrategy.DEFAULT_COMPRESSION_STRATEGYupon callinggetEffectiveSpec().longEncoding- encoding strategy for metric and dimension columns with type long, null to use the default. Defaults toCompressionFactory.DEFAULT_LONG_ENCODING_STRATEGYupon callinggetEffectiveSpec()complexMetricCompression- defaultCompressionStrategyto use for complex type columns which use generic serializers. Defaults to null which means no compression upon callinggetEffectiveSpec().jsonCompression- deprecated mechanism to define default json column 'raw' storage compression. This has been replaced byautoColumnFormatSpecwhich hasNestedCommonFormatColumnFormatSpec.getObjectStorageCompression(). If this is set andautoColumnFormatSpecis null, this value will be used to set the object storage compression of the computedautoColumnFormatSpecupon callinggetEffectiveSpec()segmentLoader- specify aSegmentizerFactorywhich will be written to 'factory.json' and used to load the written segmentautoColumnFormatSpec- specify the defaultNestedCommonFormatColumnFormatSpecto use for json and auto columns. Defaults to null upon callinggetEffectiveSpec().stringColumnFormatSpec- specify the defaultStringColumnFormatSpecto use for string columns. Defaults to null upon callinggetEffectiveSpec().
-
-
Method Details
-
getDefault
-
builder
-
getBitmapSerdeFactory
-
getMetadataCompression
-
getDimensionCompression
-
getStringDictionaryEncoding
-
getMetricCompression
-
getLongEncoding
-
getComplexMetricCompression
-
getSegmentLoader
-
getJsonCompression
Deprecated. -
getAutoColumnFormatSpec
-
getStringColumnFormatSpec
-
getEffectiveSpec
Populate all null fields ofIndexSpec, first fromgetDefault()and finally falling back to hard coded defaults if no overrides are defined. -
equals
-
hashCode
public int hashCode() -
toString
-