Search in sources :

Example 1 with TimeBoundaryQueryQueryToolChest

use of org.apache.druid.query.timeboundary.TimeBoundaryQueryQueryToolChest in project druid by druid-io.

the class CachingClusteredClientTestUtils method createWarehouse.

/**
 * Returns a new {@link QueryToolChestWarehouse} for unit tests and a resourceCloser which should be closed at the end
 * of the test.
 */
public static Pair<QueryToolChestWarehouse, Closer> createWarehouse(ObjectMapper objectMapper) {
    final Pair<GroupByQueryRunnerFactory, Closer> factoryCloserPair = GroupByQueryRunnerTest.makeQueryRunnerFactory(new GroupByQueryConfig());
    final GroupByQueryRunnerFactory factory = factoryCloserPair.lhs;
    final Closer resourceCloser = factoryCloserPair.rhs;
    return Pair.of(new MapQueryToolChestWarehouse(ImmutableMap.<Class<? extends Query>, QueryToolChest>builder().put(TimeseriesQuery.class, new TimeseriesQueryQueryToolChest()).put(TopNQuery.class, new TopNQueryQueryToolChest(new TopNQueryConfig())).put(SearchQuery.class, new SearchQueryQueryToolChest(new SearchQueryConfig())).put(GroupByQuery.class, factory.getToolchest()).put(TimeBoundaryQuery.class, new TimeBoundaryQueryQueryToolChest()).build()), resourceCloser);
}
Also used : Closer(org.apache.druid.java.util.common.io.Closer) SearchQuery(org.apache.druid.query.search.SearchQuery) GroupByQueryRunnerFactory(org.apache.druid.query.groupby.GroupByQueryRunnerFactory) TimeseriesQuery(org.apache.druid.query.timeseries.TimeseriesQuery) TopNQuery(org.apache.druid.query.topn.TopNQuery) Query(org.apache.druid.query.Query) TimeBoundaryQuery(org.apache.druid.query.timeboundary.TimeBoundaryQuery) SearchQuery(org.apache.druid.query.search.SearchQuery) GroupByQuery(org.apache.druid.query.groupby.GroupByQuery) TimeseriesQuery(org.apache.druid.query.timeseries.TimeseriesQuery) SearchQueryConfig(org.apache.druid.query.search.SearchQueryConfig) GroupByQueryConfig(org.apache.druid.query.groupby.GroupByQueryConfig) TopNQueryQueryToolChest(org.apache.druid.query.topn.TopNQueryQueryToolChest) TimeseriesQueryQueryToolChest(org.apache.druid.query.timeseries.TimeseriesQueryQueryToolChest) QueryToolChest(org.apache.druid.query.QueryToolChest) TimeBoundaryQueryQueryToolChest(org.apache.druid.query.timeboundary.TimeBoundaryQueryQueryToolChest) SearchQueryQueryToolChest(org.apache.druid.query.search.SearchQueryQueryToolChest) TimeseriesQueryQueryToolChest(org.apache.druid.query.timeseries.TimeseriesQueryQueryToolChest) TimeBoundaryQuery(org.apache.druid.query.timeboundary.TimeBoundaryQuery) SearchQueryQueryToolChest(org.apache.druid.query.search.SearchQueryQueryToolChest) TopNQueryConfig(org.apache.druid.query.topn.TopNQueryConfig) MapQueryToolChestWarehouse(org.apache.druid.query.MapQueryToolChestWarehouse) TimeBoundaryQueryQueryToolChest(org.apache.druid.query.timeboundary.TimeBoundaryQueryQueryToolChest) TopNQueryQueryToolChest(org.apache.druid.query.topn.TopNQueryQueryToolChest)

Aggregations

Closer (org.apache.druid.java.util.common.io.Closer)1 MapQueryToolChestWarehouse (org.apache.druid.query.MapQueryToolChestWarehouse)1 Query (org.apache.druid.query.Query)1 QueryToolChest (org.apache.druid.query.QueryToolChest)1 GroupByQuery (org.apache.druid.query.groupby.GroupByQuery)1 GroupByQueryConfig (org.apache.druid.query.groupby.GroupByQueryConfig)1 GroupByQueryRunnerFactory (org.apache.druid.query.groupby.GroupByQueryRunnerFactory)1 SearchQuery (org.apache.druid.query.search.SearchQuery)1 SearchQueryConfig (org.apache.druid.query.search.SearchQueryConfig)1 SearchQueryQueryToolChest (org.apache.druid.query.search.SearchQueryQueryToolChest)1 TimeBoundaryQuery (org.apache.druid.query.timeboundary.TimeBoundaryQuery)1 TimeBoundaryQueryQueryToolChest (org.apache.druid.query.timeboundary.TimeBoundaryQueryQueryToolChest)1 TimeseriesQuery (org.apache.druid.query.timeseries.TimeseriesQuery)1 TimeseriesQueryQueryToolChest (org.apache.druid.query.timeseries.TimeseriesQueryQueryToolChest)1 TopNQuery (org.apache.druid.query.topn.TopNQuery)1 TopNQueryConfig (org.apache.druid.query.topn.TopNQueryConfig)1 TopNQueryQueryToolChest (org.apache.druid.query.topn.TopNQueryQueryToolChest)1