Search in sources :

Example 1 with SearchStrategySelector

use of org.apache.druid.query.search.SearchStrategySelector in project druid by druid-io.

the class TestQueryRunners method makeSearchQueryRunner.

public static <T> QueryRunner<T> makeSearchQueryRunner(Segment adapter) {
    final SearchQueryConfig config = new SearchQueryConfig();
    QueryRunnerFactory factory = new SearchQueryRunnerFactory(new SearchStrategySelector(Suppliers.ofInstance(config)), new SearchQueryQueryToolChest(config), QueryRunnerTestHelper.NOOP_QUERYWATCHER);
    return new FinalizeResultsQueryRunner<T>(factory.createRunner(adapter), factory.getToolchest());
}
Also used : SearchQueryQueryToolChest(org.apache.druid.query.search.SearchQueryQueryToolChest) SearchQueryConfig(org.apache.druid.query.search.SearchQueryConfig) TimeBoundaryQueryRunnerFactory(org.apache.druid.query.timeboundary.TimeBoundaryQueryRunnerFactory) SearchQueryRunnerFactory(org.apache.druid.query.search.SearchQueryRunnerFactory) TopNQueryRunnerFactory(org.apache.druid.query.topn.TopNQueryRunnerFactory) TimeseriesQueryRunnerFactory(org.apache.druid.query.timeseries.TimeseriesQueryRunnerFactory) SearchQueryRunnerFactory(org.apache.druid.query.search.SearchQueryRunnerFactory) SearchStrategySelector(org.apache.druid.query.search.SearchStrategySelector)

Example 2 with SearchStrategySelector

use of org.apache.druid.query.search.SearchStrategySelector in project druid by druid-io.

the class SearchBenchmark method setup.

/**
 * Setup everything common for benchmarking both the incremental-index and the queriable-index.
 */
@Setup
public void setup() {
    log.info("SETUP CALLED AT " + +System.currentTimeMillis());
    ComplexMetrics.registerSerde("hyperUnique", new HyperUniquesSerde());
    setupQueries();
    String[] schemaQuery = schemaAndQuery.split("\\.");
    String schemaName = schemaQuery[0];
    String queryName = schemaQuery[1];
    schemaInfo = GeneratorBasicSchemas.SCHEMA_MAP.get(schemaName);
    queryBuilder = SCHEMA_QUERY_MAP.get(schemaName).get(queryName);
    queryBuilder.limit(limit);
    query = queryBuilder.build();
    generator = new DataGenerator(schemaInfo.getColumnSchemas(), RNG_SEED, schemaInfo.getDataInterval(), rowsPerSegment);
    final SearchQueryConfig config = new SearchQueryConfig().withOverrides(query);
    factory = new SearchQueryRunnerFactory(new SearchStrategySelector(Suppliers.ofInstance(config)), new SearchQueryQueryToolChest(config), QueryBenchmarkUtil.NOOP_QUERYWATCHER);
}
Also used : SearchQueryQueryToolChest(org.apache.druid.query.search.SearchQueryQueryToolChest) SearchQueryConfig(org.apache.druid.query.search.SearchQueryConfig) DataGenerator(org.apache.druid.segment.generator.DataGenerator) HyperUniquesSerde(org.apache.druid.query.aggregation.hyperloglog.HyperUniquesSerde) SearchQueryRunnerFactory(org.apache.druid.query.search.SearchQueryRunnerFactory) SearchStrategySelector(org.apache.druid.query.search.SearchStrategySelector) Setup(org.openjdk.jmh.annotations.Setup)

Aggregations

SearchQueryConfig (org.apache.druid.query.search.SearchQueryConfig)2 SearchQueryQueryToolChest (org.apache.druid.query.search.SearchQueryQueryToolChest)2 SearchQueryRunnerFactory (org.apache.druid.query.search.SearchQueryRunnerFactory)2 SearchStrategySelector (org.apache.druid.query.search.SearchStrategySelector)2 HyperUniquesSerde (org.apache.druid.query.aggregation.hyperloglog.HyperUniquesSerde)1 TimeBoundaryQueryRunnerFactory (org.apache.druid.query.timeboundary.TimeBoundaryQueryRunnerFactory)1 TimeseriesQueryRunnerFactory (org.apache.druid.query.timeseries.TimeseriesQueryRunnerFactory)1 TopNQueryRunnerFactory (org.apache.druid.query.topn.TopNQueryRunnerFactory)1 DataGenerator (org.apache.druid.segment.generator.DataGenerator)1 Setup (org.openjdk.jmh.annotations.Setup)1