public class GroupByStrategyV1 extends Object implements GroupByStrategy
Constructor and Description |
---|
GroupByStrategyV1(com.google.common.base.Supplier<GroupByQueryConfig> configSupplier,
GroupByQueryEngine engine,
QueryWatcher queryWatcher,
NonBlockingPool<ByteBuffer> bufferPool) |
@Inject public GroupByStrategyV1(com.google.common.base.Supplier<GroupByQueryConfig> configSupplier, GroupByQueryEngine engine, QueryWatcher queryWatcher, NonBlockingPool<ByteBuffer> bufferPool)
public GroupByQueryResource prepareResource(GroupByQuery query, boolean willMergeRunners)
GroupByStrategy
prepareResource
in interface GroupByStrategy
query
- a groupBy query to be processedpublic boolean isCacheable(boolean willMergeRunners)
GroupByStrategy
willMergeRunners
parameter can be used for distinguishing the caller is a broker or a data node.isCacheable
in interface GroupByStrategy
willMergeRunners
- indicates that QueryRunnerFactory.mergeRunners(ExecutorService, Iterable)
will be
called on the cached by-segment resultspublic QueryRunner<org.apache.druid.data.input.Row> createIntervalChunkingRunner(IntervalChunkingQueryRunnerDecorator decorator, QueryRunner<org.apache.druid.data.input.Row> runner, GroupByQueryQueryToolChest toolChest)
GroupByStrategy
createIntervalChunkingRunner
in interface GroupByStrategy
public boolean doMergeResults(GroupByQuery query)
GroupByStrategy
doMergeResults
in interface GroupByStrategy
public Sequence<org.apache.druid.data.input.Row> mergeResults(QueryRunner<org.apache.druid.data.input.Row> baseRunner, GroupByQuery query, Map<String,Object> responseContext)
mergeResults
in interface GroupByStrategy
public Sequence<org.apache.druid.data.input.Row> applyPostProcessing(Sequence<org.apache.druid.data.input.Row> results, GroupByQuery query)
applyPostProcessing
in interface GroupByStrategy
public Sequence<org.apache.druid.data.input.Row> processSubqueryResult(GroupByQuery subquery, GroupByQuery query, GroupByQueryResource resource, Sequence<org.apache.druid.data.input.Row> subqueryResult)
processSubqueryResult
in interface GroupByStrategy
public Sequence<org.apache.druid.data.input.Row> processSubtotalsSpec(GroupByQuery query, GroupByQueryResource resource, Sequence<org.apache.druid.data.input.Row> queryResult)
processSubtotalsSpec
in interface GroupByStrategy
public QueryRunner<org.apache.druid.data.input.Row> mergeRunners(com.google.common.util.concurrent.ListeningExecutorService exec, Iterable<QueryRunner<org.apache.druid.data.input.Row>> queryRunners)
mergeRunners
in interface GroupByStrategy
public Sequence<org.apache.druid.data.input.Row> process(GroupByQuery query, StorageAdapter storageAdapter)
process
in interface GroupByStrategy
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.