Class AppendableIndexBuilder

java.lang.Object
org.apache.druid.segment.incremental.AppendableIndexBuilder
Direct Known Subclasses:
OnheapIncrementalIndex.Builder

public abstract class AppendableIndexBuilder extends Object
  • Field Details

    • incrementalIndexSchema

      @Nullable protected IncrementalIndexSchema incrementalIndexSchema
    • maxRowCount

      protected int maxRowCount
    • maxBytesInMemory

      protected long maxBytesInMemory
    • preserveExistingMetrics

      protected boolean preserveExistingMetrics
    • log

      protected final Logger log
  • Constructor Details

    • AppendableIndexBuilder

      public AppendableIndexBuilder()
  • Method Details

    • 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 of AggregatorFactory 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 of AggregatorFactory metrics
      Returns:
      this
    • setMaxRowCount

      public AppendableIndexBuilder setMaxRowCount(int maxRowCount)
    • setMaxBytesInMemory

      public AppendableIndexBuilder setMaxBytesInMemory(long maxBytesInMemory)
    • setPreserveExistingMetrics

      public AppendableIndexBuilder setPreserveExistingMetrics(boolean preserveExistingMetrics)
    • validate

      public void validate()
    • build

      public final IncrementalIndex build()
    • buildInner

      protected abstract IncrementalIndex buildInner()