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 boolean
concurrentEventAdd
protected boolean
deserializeComplexMetrics
protected IncrementalIndexSchema
incrementalIndexSchema
protected Logger
log
protected long
maxBytesInMemory
protected int
maxRowCount
protected boolean
preserveExistingMetrics
protected boolean
sortFacts
protected boolean
useMaxMemoryEstimates
-
Constructor Summary
Constructors Constructor Description AppendableIndexBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IncrementalIndex
build()
protected abstract IncrementalIndex
buildInner()
AppendableIndexBuilder
setConcurrentEventAdd(boolean concurrentEventAdd)
AppendableIndexBuilder
setDeserializeComplexMetrics(boolean deserializeComplexMetrics)
AppendableIndexBuilder
setIndexSchema(IncrementalIndexSchema incrementalIndexSchema)
AppendableIndexBuilder
setMaxBytesInMemory(long maxBytesInMemory)
AppendableIndexBuilder
setMaxRowCount(int maxRowCount)
AppendableIndexBuilder
setPreserveExistingMetrics(boolean preserveExistingMetrics)
AppendableIndexBuilder
setSimpleTestingIndexSchema(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.AppendableIndexBuilder
setSimpleTestingIndexSchema(AggregatorFactory... metrics)
A helper method to set a simple index schema with only metrics and default values for the other parameters.AppendableIndexBuilder
setSortFacts(boolean sortFacts)
AppendableIndexBuilder
setUseMaxMemoryEstimates(boolean useMaxMemoryEstimates)
void
validate()
-
-
-
Field Detail
-
incrementalIndexSchema
@Nullable protected IncrementalIndexSchema incrementalIndexSchema
-
deserializeComplexMetrics
protected boolean deserializeComplexMetrics
-
concurrentEventAdd
protected boolean concurrentEventAdd
-
sortFacts
protected boolean sortFacts
-
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 ofAggregatorFactory
metrics- 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 ofAggregatorFactory
metrics- Returns:
- this
-
setDeserializeComplexMetrics
public AppendableIndexBuilder setDeserializeComplexMetrics(boolean deserializeComplexMetrics)
-
setConcurrentEventAdd
public AppendableIndexBuilder setConcurrentEventAdd(boolean concurrentEventAdd)
-
setSortFacts
public AppendableIndexBuilder setSortFacts(boolean sortFacts)
-
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()
-
-