public class SegmentMetadataQueryQueryToolChest extends QueryToolChest<SegmentAnalysis,SegmentMetadataQuery>
| Constructor and Description |
|---|
SegmentMetadataQueryQueryToolChest(SegmentMetadataQueryConfig config) |
| Modifier and Type | Method and Description |
|---|---|
<T extends LogicalSegment> |
filterSegments(SegmentMetadataQuery query,
List<T> segments)
This method is called to allow the query to prune segments that it does not believe need to actually
be queried.
|
static SegmentAnalysis |
finalizeAnalysis(SegmentAnalysis analysis) |
CacheStrategy<SegmentAnalysis,SegmentAnalysis,SegmentMetadataQuery> |
getCacheStrategy(SegmentMetadataQuery 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<SegmentAnalysis> |
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(SegmentMetadataQuery query)
Creates a builder that is used to generate a metric for this specific query type.
|
com.google.common.base.Function<SegmentAnalysis,SegmentAnalysis> |
makePreComputeManipulatorFn(SegmentMetadataQuery 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.
|
static SegmentAnalysis |
mergeAnalyses(SegmentAnalysis arg1,
SegmentAnalysis arg2,
boolean lenientAggregatorMerge) |
QueryRunner<SegmentAnalysis> |
mergeResults(QueryRunner<SegmentAnalysis> runner)
This method wraps a QueryRunner.
|
makePostComputeManipulatorFn, postMergeQueryDecoration, preMergeQueryDecoration@Inject public SegmentMetadataQueryQueryToolChest(SegmentMetadataQueryConfig config)
public QueryRunner<SegmentAnalysis> mergeResults(QueryRunner<SegmentAnalysis> runner)
QueryToolChestmergeResults in class QueryToolChest<SegmentAnalysis,SegmentMetadataQuery>runner - A QueryRunner that provides a series of ResultType objects in time order (ascending or descending)public com.metamx.emitter.service.ServiceMetricEvent.Builder makeMetricBuilder(SegmentMetadataQuery query)
QueryToolChestmakeMetricBuilder in class QueryToolChest<SegmentAnalysis,SegmentMetadataQuery>query - The query that is being processedpublic com.google.common.base.Function<SegmentAnalysis,SegmentAnalysis> makePreComputeManipulatorFn(SegmentMetadataQuery query, MetricManipulationFn fn)
QueryToolChestThis exists because the QueryToolChest is the only thing that understands the internal serialization format of ResultType, so it's primary responsibility is to "decompose" that structure and apply the given function to all metrics.
This function is called very early in the processing pipeline on the Broker.
makePreComputeManipulatorFn in class QueryToolChest<SegmentAnalysis,SegmentMetadataQuery>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<SegmentAnalysis> getResultTypeReference()
QueryToolChestgetResultTypeReference in class QueryToolChest<SegmentAnalysis,SegmentMetadataQuery>public CacheStrategy<SegmentAnalysis,SegmentAnalysis,SegmentMetadataQuery> getCacheStrategy(SegmentMetadataQuery query)
QueryToolChestThis is optional. If it returns null, caching is effectively disabled for the query.
getCacheStrategy in class QueryToolChest<SegmentAnalysis,SegmentMetadataQuery>query - The query whose results might be cachedpublic <T extends LogicalSegment> List<T> filterSegments(SegmentMetadataQuery query, List<T> segments)
QueryToolChestfilterSegments in class QueryToolChest<SegmentAnalysis,SegmentMetadataQuery>T - A Generic parameter because Java is coolquery - The query being processedsegments - The list of candidate segments to be queriedpublic static SegmentAnalysis mergeAnalyses(SegmentAnalysis arg1, SegmentAnalysis arg2, boolean lenientAggregatorMerge)
public static SegmentAnalysis finalizeAnalysis(SegmentAnalysis analysis)
Copyright © 2011–2017. All rights reserved.