Package org.apache.druid.segment
Class IndexSpec
- java.lang.Object
-
- org.apache.druid.segment.IndexSpec
-
public class IndexSpec extends Object
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexSpec.Builder
-
Constructor Summary
Constructors Constructor Description IndexSpec(BitmapSerdeFactory bitmapSerdeFactory, CompressionStrategy dimensionCompression, StringEncodingStrategy stringDictionaryEncoding, CompressionStrategy metricCompression, CompressionFactory.LongEncodingStrategy longEncoding, CompressionStrategy jsonCompression, SegmentizerFactory segmentLoader)Creates an IndexSpec with the given storage format settings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>asMap(com.fasterxml.jackson.databind.ObjectMapper objectMapper)static IndexSpec.Builderbuilder()booleanequals(Object o)BitmapSerdeFactorygetBitmapSerdeFactory()CompressionStrategygetDimensionCompression()CompressionStrategygetJsonCompression()CompressionFactory.LongEncodingStrategygetLongEncoding()CompressionStrategygetMetricCompression()SegmentizerFactorygetSegmentLoader()StringEncodingStrategygetStringDictionaryEncoding()inthashCode()StringtoString()
-
-
-
Field Detail
-
DEFAULT
public static IndexSpec DEFAULT
-
-
Constructor Detail
-
IndexSpec
public IndexSpec(@Nullable BitmapSerdeFactory bitmapSerdeFactory, @Nullable CompressionStrategy dimensionCompression, @Nullable StringEncodingStrategy stringDictionaryEncoding, @Nullable CompressionStrategy metricCompression, @Nullable CompressionFactory.LongEncodingStrategy longEncoding, @Nullable CompressionStrategy jsonCompression, @Nullable SegmentizerFactory segmentLoader)
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 inBitmapSerdedimensionCompression- compression format for dimension columns, null to use the default. Defaults toCompressionStrategy.DEFAULT_COMPRESSION_STRATEGYstringDictionaryEncoding- 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_STRATEGYlongEncoding- encoding strategy for metric and dimension columns with type long, null to use the default. Defaults toCompressionFactory.DEFAULT_LONG_ENCODING_STRATEGYsegmentLoader- specify aSegmentizerFactorywhich will be written to 'factory.json' and used to load the written segment
-
-
Method Detail
-
builder
public static IndexSpec.Builder builder()
-
getBitmapSerdeFactory
public BitmapSerdeFactory getBitmapSerdeFactory()
-
getDimensionCompression
public CompressionStrategy getDimensionCompression()
-
getStringDictionaryEncoding
public StringEncodingStrategy getStringDictionaryEncoding()
-
getMetricCompression
public CompressionStrategy getMetricCompression()
-
getLongEncoding
public CompressionFactory.LongEncodingStrategy getLongEncoding()
-
getSegmentLoader
@Nullable public SegmentizerFactory getSegmentLoader()
-
getJsonCompression
@Nullable public CompressionStrategy getJsonCompression()
-
-