Search in sources :

Example 16 with IndexIO

use of org.apache.druid.segment.IndexIO in project druid by druid-io.

the class AggregationTestHelper method createScanQueryAggregationTestHelper.

public static AggregationTestHelper createScanQueryAggregationTestHelper(List<? extends Module> jsonModulesToRegister, TemporaryFolder tempFolder) {
    ObjectMapper mapper = TestHelper.makeJsonMapper();
    ScanQueryQueryToolChest toolchest = new ScanQueryQueryToolChest(new ScanQueryConfig(), DefaultGenericQueryMetricsFactory.instance());
    final Closer resourceCloser = Closer.create();
    ScanQueryRunnerFactory factory = new ScanQueryRunnerFactory(toolchest, new ScanQueryEngine(), new ScanQueryConfig());
    IndexIO indexIO = new IndexIO(mapper, new ColumnConfig() {

        @Override
        public int columnCacheSizeBytes() {
            return 0;
        }
    });
    return new AggregationTestHelper(mapper, new IndexMergerV9(mapper, indexIO, OffHeapMemorySegmentWriteOutMediumFactory.instance()), indexIO, toolchest, factory, tempFolder, jsonModulesToRegister, resourceCloser, Collections.emptyMap());
}
Also used : Closer(org.apache.druid.java.util.common.io.Closer) ScanQueryConfig(org.apache.druid.query.scan.ScanQueryConfig) ScanQueryQueryToolChest(org.apache.druid.query.scan.ScanQueryQueryToolChest) IndexIO(org.apache.druid.segment.IndexIO) ColumnConfig(org.apache.druid.segment.column.ColumnConfig) IndexMergerV9(org.apache.druid.segment.IndexMergerV9) ScanQueryEngine(org.apache.druid.query.scan.ScanQueryEngine) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) ScanQueryRunnerFactory(org.apache.druid.query.scan.ScanQueryRunnerFactory)

Aggregations

IndexIO (org.apache.druid.segment.IndexIO)16 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)8 File (java.io.File)8 DefaultObjectMapper (org.apache.druid.jackson.DefaultObjectMapper)6 IndexMergerV9 (org.apache.druid.segment.IndexMergerV9)6 ColumnConfig (org.apache.druid.segment.column.ColumnConfig)5 QueryableIndex (org.apache.druid.segment.QueryableIndex)4 Before (org.junit.Before)4 InjectableValues (com.fasterxml.jackson.databind.InjectableValues)3 ArrayList (java.util.ArrayList)3 SegmentizerModule (org.apache.druid.jackson.SegmentizerModule)3 Closer (org.apache.druid.java.util.common.io.Closer)3 IndexMerger (org.apache.druid.segment.IndexMerger)3 IndexSpec (org.apache.druid.segment.IndexSpec)3 IncrementalIndex (org.apache.druid.segment.incremental.IncrementalIndex)3 NamedType (com.fasterxml.jackson.databind.jsontype.NamedType)2 SimpleModule (com.fasterxml.jackson.databind.module.SimpleModule)2 Injector (com.google.inject.Injector)2 IAE (org.apache.druid.java.util.common.IAE)2 ExprMacroTable (org.apache.druid.math.expr.ExprMacroTable)2