public class GroupByStrategyV2 extends Object implements GroupByStrategy
Modifier and Type | Field and Description |
---|---|
static String |
CTX_KEY_FUDGE_TIMESTAMP |
static String |
CTX_KEY_OUTERMOST |
Constructor and Description |
---|
GroupByStrategyV2(DruidProcessingConfig processingConfig,
com.google.common.base.Supplier<GroupByQueryConfig> configSupplier,
StupidPool<ByteBuffer> bufferPool,
BlockingPool<ByteBuffer> mergeBufferPool,
com.fasterxml.jackson.databind.ObjectMapper spillMapper,
QueryWatcher queryWatcher) |
Modifier and Type | Method and Description |
---|---|
QueryRunner<Row> |
createIntervalChunkingRunner(IntervalChunkingQueryRunnerDecorator decorator,
QueryRunner<Row> runner,
GroupByQueryQueryToolChest toolChest)
Decorate a runner with an interval chunking decorator.
|
boolean |
doMergeResults(GroupByQuery query)
Indicates if this query should undergo "mergeResults" or not.
|
static org.joda.time.DateTime |
getUniversalTimestamp(GroupByQuery query)
If "query" has a single universal timestamp, return it.
|
boolean |
isCacheable(boolean willMergeRunners)
Indicates this strategy is cacheable or not.
|
Sequence<Row> |
mergeResults(QueryRunner<Row> baseRunner,
GroupByQuery query,
Map<String,Object> responseContext) |
QueryRunner<Row> |
mergeRunners(com.google.common.util.concurrent.ListeningExecutorService exec,
Iterable<QueryRunner<Row>> queryRunners) |
GroupByQueryResource |
prepareResource(GroupByQuery query,
boolean willMergeRunners)
Initializes resources required for a broker to process the given query.
|
Sequence<Row> |
process(GroupByQuery query,
StorageAdapter storageAdapter) |
Sequence<Row> |
processSubqueryResult(GroupByQuery subquery,
GroupByQuery query,
GroupByQueryResource resource,
Sequence<Row> subqueryResult) |
public static final String CTX_KEY_FUDGE_TIMESTAMP
public static final String CTX_KEY_OUTERMOST
@Inject public GroupByStrategyV2(DruidProcessingConfig processingConfig, com.google.common.base.Supplier<GroupByQueryConfig> configSupplier, StupidPool<ByteBuffer> bufferPool, BlockingPool<ByteBuffer> mergeBufferPool, com.fasterxml.jackson.databind.ObjectMapper spillMapper, QueryWatcher queryWatcher)
public static org.joda.time.DateTime getUniversalTimestamp(GroupByQuery query)
query
- the querypublic 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 boolean doMergeResults(GroupByQuery query)
GroupByStrategy
doMergeResults
in interface GroupByStrategy
public QueryRunner<Row> createIntervalChunkingRunner(IntervalChunkingQueryRunnerDecorator decorator, QueryRunner<Row> runner, GroupByQueryQueryToolChest toolChest)
GroupByStrategy
createIntervalChunkingRunner
in interface GroupByStrategy
public Sequence<Row> mergeResults(QueryRunner<Row> baseRunner, GroupByQuery query, Map<String,Object> responseContext)
mergeResults
in interface GroupByStrategy
public Sequence<Row> processSubqueryResult(GroupByQuery subquery, GroupByQuery query, GroupByQueryResource resource, Sequence<Row> subqueryResult)
processSubqueryResult
in interface GroupByStrategy
public QueryRunner<Row> mergeRunners(com.google.common.util.concurrent.ListeningExecutorService exec, Iterable<QueryRunner<Row>> queryRunners)
mergeRunners
in interface GroupByStrategy
public Sequence<Row> process(GroupByQuery query, StorageAdapter storageAdapter)
process
in interface GroupByStrategy
Copyright © 2011–2017. All rights reserved.