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,
                 NonBlockingPool<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, NonBlockingPool<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)
GroupByStrategyprepareResource in interface GroupByStrategyquery - a groupBy query to be processedpublic boolean isCacheable(boolean willMergeRunners)
GroupByStrategywillMergeRunners parameter can be used for distinguishing the caller is a broker or a data node.isCacheable in interface GroupByStrategywillMergeRunners - indicates that QueryRunnerFactory.mergeRunners(ExecutorService, Iterable) will be
                         called on the cached by-segment resultspublic boolean doMergeResults(GroupByQuery query)
GroupByStrategydoMergeResults in interface GroupByStrategypublic QueryRunner<Row> createIntervalChunkingRunner(IntervalChunkingQueryRunnerDecorator decorator, QueryRunner<Row> runner, GroupByQueryQueryToolChest toolChest)
GroupByStrategycreateIntervalChunkingRunner in interface GroupByStrategypublic Sequence<Row> mergeResults(QueryRunner<Row> baseRunner, GroupByQuery query, Map<String,Object> responseContext)
mergeResults in interface GroupByStrategypublic Sequence<Row> processSubqueryResult(GroupByQuery subquery, GroupByQuery query, GroupByQueryResource resource, Sequence<Row> subqueryResult)
processSubqueryResult in interface GroupByStrategypublic QueryRunner<Row> mergeRunners(com.google.common.util.concurrent.ListeningExecutorService exec, Iterable<QueryRunner<Row>> queryRunners)
mergeRunners in interface GroupByStrategypublic Sequence<Row> process(GroupByQuery query, StorageAdapter storageAdapter)
process in interface GroupByStrategyCopyright © 2011–2018. All rights reserved.