public class GroupByQueryQueryToolChest extends QueryToolChest<io.druid.data.input.Row,GroupByQuery>
Constructor and Description |
---|
GroupByQueryQueryToolChest(com.google.common.base.Supplier<GroupByQueryConfig> configSupplier,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper,
GroupByQueryEngine engine,
StupidPool<ByteBuffer> bufferPool,
IntervalChunkingQueryRunnerDecorator intervalChunkingQueryRunnerDecorator) |
Modifier and Type | Method and Description |
---|---|
static Collection<DimensionSpec> |
extractionsToRewrite(GroupByQuery query)
This function checks the query for dimensions which can be optimized by applying the dimension extraction
as the final step of the query instead of on every event.
|
CacheStrategy<io.druid.data.input.Row,Object,GroupByQuery> |
getCacheStrategy(GroupByQuery query)
Returns a CacheStrategy to be used to load data into the cache and remove it from the cache.
|
com.fasterxml.jackson.core.type.TypeReference<io.druid.data.input.Row> |
getResultTypeReference()
Returns a TypeReference object that is just passed through to Jackson in order to deserialize
the results of this type of query.
|
com.metamx.emitter.service.ServiceMetricEvent.Builder |
makeMetricBuilder(GroupByQuery query)
Creates a builder that is used to generate a metric for this specific query type.
|
com.google.common.base.Function<io.druid.data.input.Row,io.druid.data.input.Row> |
makePostComputeManipulatorFn(GroupByQuery query,
MetricManipulationFn fn)
Generally speaking this is the exact same thing as makePreComputeManipulatorFn.
|
com.google.common.base.Function<io.druid.data.input.Row,io.druid.data.input.Row> |
makePreComputeManipulatorFn(GroupByQuery query,
MetricManipulationFn fn)
Creates a Function that can take in a ResultType and return a new ResultType having applied
the MetricManipulatorFn to each of the metrics.
|
QueryRunner<io.druid.data.input.Row> |
mergeResults(QueryRunner<io.druid.data.input.Row> runner)
This method wraps a QueryRunner.
|
com.metamx.common.guava.Sequence<io.druid.data.input.Row> |
mergeSequences(com.metamx.common.guava.Sequence<com.metamx.common.guava.Sequence<io.druid.data.input.Row>> seqOfSequences)
This method doesn't belong here, but it's here for now just to make it work.
|
com.metamx.common.guava.Sequence<io.druid.data.input.Row> |
mergeSequencesUnordered(com.metamx.common.guava.Sequence<com.metamx.common.guava.Sequence<io.druid.data.input.Row>> seqOfSequences)
This method doesn't belong here, but it's here for now just to make it work.
|
QueryRunner<io.druid.data.input.Row> |
preMergeQueryDecoration(QueryRunner<io.druid.data.input.Row> runner)
Wraps a QueryRunner.
|
filterSegments, postMergeQueryDecoration
@Inject public GroupByQueryQueryToolChest(com.google.common.base.Supplier<GroupByQueryConfig> configSupplier, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, GroupByQueryEngine engine, StupidPool<ByteBuffer> bufferPool, IntervalChunkingQueryRunnerDecorator intervalChunkingQueryRunnerDecorator)
public QueryRunner<io.druid.data.input.Row> mergeResults(QueryRunner<io.druid.data.input.Row> runner)
QueryToolChest
mergeResults
in class QueryToolChest<io.druid.data.input.Row,GroupByQuery>
runner
- A QueryRunner that provides a series of ResultType objects in time order (ascending)public com.metamx.common.guava.Sequence<io.druid.data.input.Row> mergeSequences(com.metamx.common.guava.Sequence<com.metamx.common.guava.Sequence<io.druid.data.input.Row>> seqOfSequences)
QueryToolChest
mergeSequences
in class QueryToolChest<io.druid.data.input.Row,GroupByQuery>
seqOfSequences
- sequence of sequences to be mergedpublic com.metamx.common.guava.Sequence<io.druid.data.input.Row> mergeSequencesUnordered(com.metamx.common.guava.Sequence<com.metamx.common.guava.Sequence<io.druid.data.input.Row>> seqOfSequences)
QueryToolChest
mergeSequencesUnordered
in class QueryToolChest<io.druid.data.input.Row,GroupByQuery>
seqOfSequences
- sequence of sequences to be mergedpublic com.metamx.emitter.service.ServiceMetricEvent.Builder makeMetricBuilder(GroupByQuery query)
QueryToolChest
makeMetricBuilder
in class QueryToolChest<io.druid.data.input.Row,GroupByQuery>
query
- The query that is being processedpublic com.google.common.base.Function<io.druid.data.input.Row,io.druid.data.input.Row> makePreComputeManipulatorFn(GroupByQuery query, MetricManipulationFn fn)
QueryToolChest
makePreComputeManipulatorFn
in class QueryToolChest<io.druid.data.input.Row,GroupByQuery>
query
- The Query that is currently being processedfn
- The function that should be applied to all metrics in the resultspublic com.google.common.base.Function<io.druid.data.input.Row,io.druid.data.input.Row> makePostComputeManipulatorFn(GroupByQuery query, MetricManipulationFn fn)
QueryToolChest
makePostComputeManipulatorFn
in class QueryToolChest<io.druid.data.input.Row,GroupByQuery>
query
- The Query that is currently being processedfn
- The function that should be applied to all metrics in the resultspublic com.fasterxml.jackson.core.type.TypeReference<io.druid.data.input.Row> getResultTypeReference()
QueryToolChest
getResultTypeReference
in class QueryToolChest<io.druid.data.input.Row,GroupByQuery>
public QueryRunner<io.druid.data.input.Row> preMergeQueryDecoration(QueryRunner<io.druid.data.input.Row> runner)
QueryToolChest
preMergeQueryDecoration
in class QueryToolChest<io.druid.data.input.Row,GroupByQuery>
runner
- The runner to be wrappedpublic CacheStrategy<io.druid.data.input.Row,Object,GroupByQuery> getCacheStrategy(GroupByQuery query)
QueryToolChest
getCacheStrategy
in class QueryToolChest<io.druid.data.input.Row,GroupByQuery>
query
- The query whose results might be cachedpublic static Collection<DimensionSpec> extractionsToRewrite(GroupByQuery query)
query
- The query to check for optimizationsCopyright © 2011–2015. All rights reserved.