public class TopNQueryQueryToolChest extends QueryToolChest<Result<TopNResultValue>,TopNQuery>
Constructor and Description |
---|
TopNQueryQueryToolChest(TopNQueryConfig config,
IntervalChunkingQueryRunnerDecorator intervalChunkingQueryRunnerDecorator) |
Modifier and Type | Method and Description |
---|---|
protected static String[] |
extractFactoryName(List<AggregatorFactory> aggregatorFactories) |
CacheStrategy<Result<TopNResultValue>,Object,TopNQuery> |
getCacheStrategy(TopNQuery query)
Returns a CacheStrategy to be used to load data into the cache and remove it from the cache.
|
com.google.common.collect.Ordering<Result<TopNResultValue>> |
getOrdering() |
com.fasterxml.jackson.core.type.TypeReference<Result<TopNResultValue>> |
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(TopNQuery query)
Creates a builder that is used to generate a metric for this specific query type.
|
com.google.common.base.Function<Result<TopNResultValue>,Result<TopNResultValue>> |
makePostComputeManipulatorFn(TopNQuery query,
MetricManipulationFn fn)
Generally speaking this is the exact same thing as makePreComputeManipulatorFn.
|
com.google.common.base.Function<Result<TopNResultValue>,Result<TopNResultValue>> |
makePreComputeManipulatorFn(TopNQuery 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<Result<TopNResultValue>> |
mergeResults(QueryRunner<Result<TopNResultValue>> runner)
This method wraps a QueryRunner.
|
com.metamx.common.guava.Sequence<Result<TopNResultValue>> |
mergeSequences(com.metamx.common.guava.Sequence<com.metamx.common.guava.Sequence<Result<TopNResultValue>>> seqOfSequences)
This method doesn't belong here, but it's here for now just to make it work.
|
com.metamx.common.guava.Sequence<Result<TopNResultValue>> |
mergeSequencesUnordered(com.metamx.common.guava.Sequence<com.metamx.common.guava.Sequence<Result<TopNResultValue>>> seqOfSequences)
This method doesn't belong here, but it's here for now just to make it work.
|
QueryRunner<Result<TopNResultValue>> |
postMergeQueryDecoration(QueryRunner<Result<TopNResultValue>> runner)
Wraps a QueryRunner.
|
QueryRunner<Result<TopNResultValue>> |
preMergeQueryDecoration(QueryRunner<Result<TopNResultValue>> runner)
Wraps a QueryRunner.
|
filterSegments
@Inject public TopNQueryQueryToolChest(TopNQueryConfig config, IntervalChunkingQueryRunnerDecorator intervalChunkingQueryRunnerDecorator)
protected static String[] extractFactoryName(List<AggregatorFactory> aggregatorFactories)
public QueryRunner<Result<TopNResultValue>> mergeResults(QueryRunner<Result<TopNResultValue>> runner)
QueryToolChest
mergeResults
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
runner
- A QueryRunner that provides a series of ResultType objects in time order (ascending)public com.metamx.common.guava.Sequence<Result<TopNResultValue>> mergeSequences(com.metamx.common.guava.Sequence<com.metamx.common.guava.Sequence<Result<TopNResultValue>>> seqOfSequences)
QueryToolChest
mergeSequences
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
seqOfSequences
- sequence of sequences to be mergedpublic com.metamx.common.guava.Sequence<Result<TopNResultValue>> mergeSequencesUnordered(com.metamx.common.guava.Sequence<com.metamx.common.guava.Sequence<Result<TopNResultValue>>> seqOfSequences)
QueryToolChest
mergeSequencesUnordered
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
seqOfSequences
- sequence of sequences to be mergedpublic com.metamx.emitter.service.ServiceMetricEvent.Builder makeMetricBuilder(TopNQuery query)
QueryToolChest
makeMetricBuilder
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
query
- The query that is being processedpublic com.google.common.base.Function<Result<TopNResultValue>,Result<TopNResultValue>> makePreComputeManipulatorFn(TopNQuery query, MetricManipulationFn fn)
QueryToolChest
makePreComputeManipulatorFn
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
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<Result<TopNResultValue>,Result<TopNResultValue>> makePostComputeManipulatorFn(TopNQuery query, MetricManipulationFn fn)
QueryToolChest
makePostComputeManipulatorFn
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
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<Result<TopNResultValue>> getResultTypeReference()
QueryToolChest
getResultTypeReference
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
public CacheStrategy<Result<TopNResultValue>,Object,TopNQuery> getCacheStrategy(TopNQuery query)
QueryToolChest
getCacheStrategy
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
query
- The query whose results might be cachedpublic QueryRunner<Result<TopNResultValue>> preMergeQueryDecoration(QueryRunner<Result<TopNResultValue>> runner)
QueryToolChest
preMergeQueryDecoration
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
runner
- The runner to be wrappedpublic QueryRunner<Result<TopNResultValue>> postMergeQueryDecoration(QueryRunner<Result<TopNResultValue>> runner)
QueryToolChest
postMergeQueryDecoration
in class QueryToolChest<Result<TopNResultValue>,TopNQuery>
runner
- The runner to be wrappedpublic com.google.common.collect.Ordering<Result<TopNResultValue>> getOrdering()
Copyright © 2011–2015. All rights reserved.