Class AppendableIndexBuilder
- java.lang.Object
-
- org.apache.druid.segment.incremental.AppendableIndexBuilder
-
- Direct Known Subclasses:
OnheapIncrementalIndex.Builder
public abstract class AppendableIndexBuilder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected IncrementalIndexSchemaincrementalIndexSchemaprotected Loggerlogprotected longmaxBytesInMemoryprotected intmaxRowCountprotected booleanpreserveExistingMetricsprotected booleanuseMaxMemoryEstimates
-
Constructor Summary
Constructors Constructor Description AppendableIndexBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IncrementalIndexbuild()protected abstract IncrementalIndexbuildInner()AppendableIndexBuildersetIndexSchema(IncrementalIndexSchema incrementalIndexSchema)AppendableIndexBuildersetMaxBytesInMemory(long maxBytesInMemory)AppendableIndexBuildersetMaxRowCount(int maxRowCount)AppendableIndexBuildersetPreserveExistingMetrics(boolean preserveExistingMetrics)AppendableIndexBuildersetSimpleTestingIndexSchema(Boolean rollup, Boolean preserveExistingMetrics, AggregatorFactory... metrics)A helper method to set a simple index schema with controllable metrics and rollup, and default values for the other parameters.AppendableIndexBuildersetSimpleTestingIndexSchema(AggregatorFactory... metrics)A helper method to set a simple index schema with only metrics and default values for the other parameters.AppendableIndexBuildersetUseMaxMemoryEstimates(boolean useMaxMemoryEstimates)voidvalidate()
-
-
-
Field Detail
-
incrementalIndexSchema
@Nullable protected IncrementalIndexSchema incrementalIndexSchema
-
maxRowCount
protected int maxRowCount
-
maxBytesInMemory
protected long maxBytesInMemory
-
preserveExistingMetrics
protected boolean preserveExistingMetrics
-
useMaxMemoryEstimates
protected boolean useMaxMemoryEstimates
-
log
protected final Logger log
-
-
Method Detail
-
setIndexSchema
public AppendableIndexBuilder setIndexSchema(IncrementalIndexSchema incrementalIndexSchema)
-
setSimpleTestingIndexSchema
public AppendableIndexBuilder setSimpleTestingIndexSchema(AggregatorFactory... metrics)
A helper method to set a simple index schema with only metrics and default values for the other parameters. Note that this method is normally used for testing and benchmarking; it is unlikely that you would use it in production settings.- Parameters:
metrics- variable array ofAggregatorFactorymetrics- Returns:
- this
-
setSimpleTestingIndexSchema
public AppendableIndexBuilder setSimpleTestingIndexSchema(@Nullable Boolean rollup, @Nullable Boolean preserveExistingMetrics, AggregatorFactory... metrics)
A helper method to set a simple index schema with controllable metrics and rollup, and default values for the other parameters. Note that this method is normally used for testing and benchmarking; it is unlikely that you would use it in production settings.- Parameters:
metrics- variable array ofAggregatorFactorymetrics- Returns:
- this
-
setMaxRowCount
public AppendableIndexBuilder setMaxRowCount(int maxRowCount)
-
setMaxBytesInMemory
public AppendableIndexBuilder setMaxBytesInMemory(long maxBytesInMemory)
-
setPreserveExistingMetrics
public AppendableIndexBuilder setPreserveExistingMetrics(boolean preserveExistingMetrics)
-
setUseMaxMemoryEstimates
public AppendableIndexBuilder setUseMaxMemoryEstimates(boolean useMaxMemoryEstimates)
-
validate
public void validate()
-
build
public final IncrementalIndex build()
-
buildInner
protected abstract IncrementalIndex buildInner()
-
-