Search in sources :

Example 6 with ColumnConfig

use of io.druid.segment.column.ColumnConfig in project druid by druid-io.

the class LongGenericColumnPartSerde method getDeserializer.

@Override
public Deserializer getDeserializer() {
    return new Deserializer() {

        @Override
        public void read(ByteBuffer buffer, ColumnBuilder builder, ColumnConfig columnConfig) {
            final CompressedLongsIndexedSupplier column = CompressedLongsIndexedSupplier.fromByteBuffer(buffer, byteOrder, builder.getFileMapper());
            builder.setType(ValueType.LONG).setHasMultipleValues(false).setGenericColumn(new LongGenericColumnSupplier(column));
        }
    };
}
Also used : ColumnConfig(io.druid.segment.column.ColumnConfig) ColumnBuilder(io.druid.segment.column.ColumnBuilder) CompressedLongsIndexedSupplier(io.druid.segment.data.CompressedLongsIndexedSupplier) ByteBuffer(java.nio.ByteBuffer)

Example 7 with ColumnConfig

use of io.druid.segment.column.ColumnConfig in project druid by druid-io.

the class AggregationTestHelper method createSelectQueryAggregationTestHelper.

public static final AggregationTestHelper createSelectQueryAggregationTestHelper(List<? extends Module> jsonModulesToRegister, TemporaryFolder tempFolder) {
    ObjectMapper mapper = new DefaultObjectMapper();
    mapper.setInjectableValues(new InjectableValues.Std().addValue(SelectQueryConfig.class, new SelectQueryConfig(true)));
    Supplier<SelectQueryConfig> configSupplier = Suppliers.ofInstance(new SelectQueryConfig(true));
    SelectQueryQueryToolChest toolchest = new SelectQueryQueryToolChest(new DefaultObjectMapper(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator(), configSupplier);
    SelectQueryRunnerFactory factory = new SelectQueryRunnerFactory(new SelectQueryQueryToolChest(new DefaultObjectMapper(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator(), configSupplier), new SelectQueryEngine(configSupplier), QueryRunnerTestHelper.NOOP_QUERYWATCHER);
    IndexIO indexIO = new IndexIO(mapper, new ColumnConfig() {

        @Override
        public int columnCacheSizeBytes() {
            return 0;
        }
    });
    return new AggregationTestHelper(mapper, new IndexMerger(mapper, indexIO), indexIO, toolchest, factory, tempFolder, jsonModulesToRegister);
}
Also used : IndexMerger(io.druid.segment.IndexMerger) ColumnConfig(io.druid.segment.column.ColumnConfig) SelectQueryRunnerFactory(io.druid.query.select.SelectQueryRunnerFactory) SelectQueryConfig(io.druid.query.select.SelectQueryConfig) SelectQueryQueryToolChest(io.druid.query.select.SelectQueryQueryToolChest) SelectQueryEngine(io.druid.query.select.SelectQueryEngine) IndexIO(io.druid.segment.IndexIO) DefaultObjectMapper(io.druid.jackson.DefaultObjectMapper) DefaultObjectMapper(io.druid.jackson.DefaultObjectMapper) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 8 with ColumnConfig

use of io.druid.segment.column.ColumnConfig in project druid by druid-io.

the class AggregationTestHelper method createTimeseriesQueryAggregationTestHelper.

public static final AggregationTestHelper createTimeseriesQueryAggregationTestHelper(List<? extends Module> jsonModulesToRegister, TemporaryFolder tempFolder) {
    ObjectMapper mapper = new DefaultObjectMapper();
    TimeseriesQueryQueryToolChest toolchest = new TimeseriesQueryQueryToolChest(QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator());
    TimeseriesQueryRunnerFactory factory = new TimeseriesQueryRunnerFactory(toolchest, new TimeseriesQueryEngine(), QueryRunnerTestHelper.NOOP_QUERYWATCHER);
    IndexIO indexIO = new IndexIO(mapper, new ColumnConfig() {

        @Override
        public int columnCacheSizeBytes() {
            return 0;
        }
    });
    return new AggregationTestHelper(mapper, new IndexMerger(mapper, indexIO), indexIO, toolchest, factory, tempFolder, jsonModulesToRegister);
}
Also used : IndexMerger(io.druid.segment.IndexMerger) TimeseriesQueryEngine(io.druid.query.timeseries.TimeseriesQueryEngine) TimeseriesQueryRunnerFactory(io.druid.query.timeseries.TimeseriesQueryRunnerFactory) IndexIO(io.druid.segment.IndexIO) ColumnConfig(io.druid.segment.column.ColumnConfig) DefaultObjectMapper(io.druid.jackson.DefaultObjectMapper) TimeseriesQueryQueryToolChest(io.druid.query.timeseries.TimeseriesQueryQueryToolChest) DefaultObjectMapper(io.druid.jackson.DefaultObjectMapper) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Aggregations

ColumnConfig (io.druid.segment.column.ColumnConfig)8 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 DefaultObjectMapper (io.druid.jackson.DefaultObjectMapper)5 IndexIO (io.druid.segment.IndexIO)5 IndexMerger (io.druid.segment.IndexMerger)4 ColumnBuilder (io.druid.segment.column.ColumnBuilder)3 ByteBuffer (java.nio.ByteBuffer)3 Supplier (com.google.common.base.Supplier)1 ImmutableBitmap (io.druid.collections.bitmap.ImmutableBitmap)1 ImmutableRTree (io.druid.collections.spatial.ImmutableRTree)1 SegmentizerModule (io.druid.jackson.SegmentizerModule)1 IAE (io.druid.java.util.common.IAE)1 SmooshedFileMapper (io.druid.java.util.common.io.smoosh.SmooshedFileMapper)1 GroupByQueryRunnerFactory (io.druid.query.groupby.GroupByQueryRunnerFactory)1 SelectQueryConfig (io.druid.query.select.SelectQueryConfig)1 SelectQueryEngine (io.druid.query.select.SelectQueryEngine)1 SelectQueryQueryToolChest (io.druid.query.select.SelectQueryQueryToolChest)1 SelectQueryRunnerFactory (io.druid.query.select.SelectQueryRunnerFactory)1 TimeseriesQueryEngine (io.druid.query.timeseries.TimeseriesQueryEngine)1 TimeseriesQueryQueryToolChest (io.druid.query.timeseries.TimeseriesQueryQueryToolChest)1