public class StatsBucketPipelineAggregator extends BucketMetricsPipelineAggregator
Modifier and Type | Class and Description |
---|---|
static class |
StatsBucketPipelineAggregator.Factory |
PipelineAggregator.Parser
Modifier and Type | Field and Description |
---|---|
static PipelineAggregatorStreams.Stream |
STREAM |
static InternalAggregation.Type |
TYPE |
formatter, gapPolicy
AGGREGATION_TRANFORM_FUNCTION
Modifier | Constructor and Description |
---|---|
protected |
StatsBucketPipelineAggregator(String name,
String[] bucketsPaths,
BucketHelpers.GapPolicy gapPolicy,
ValueFormatter formatter,
Map<String,Object> metaData) |
Modifier and Type | Method and Description |
---|---|
protected InternalAggregation |
buildAggregation(List<PipelineAggregator> pipelineAggregators,
Map<String,Object> metadata)
Called after a collection run is finished to build the aggregation for
the collected state.
|
protected void |
collectBucketValue(String bucketKey,
Double bucketValue)
Called for each bucket with a value so the state can be modified based on
the key and metric value for this bucket
|
protected void |
preCollection()
Called before initial collection and between successive collection runs.
|
static void |
registerStreams() |
InternalAggregation.Type |
type() |
doReadFrom, doReduce, doWriteTo, innerReadFrom, innerWriteTo
reduce
bucketsPaths, metaData, name, readFrom, writeTo
public static final InternalAggregation.Type TYPE
public static final PipelineAggregatorStreams.Stream STREAM
protected StatsBucketPipelineAggregator(String name, String[] bucketsPaths, BucketHelpers.GapPolicy gapPolicy, ValueFormatter formatter, Map<String,Object> metaData)
public static void registerStreams()
public InternalAggregation.Type type()
type
in class PipelineAggregator
protected void preCollection()
BucketMetricsPipelineAggregator
preCollection
in class BucketMetricsPipelineAggregator
protected void collectBucketValue(String bucketKey, Double bucketValue)
BucketMetricsPipelineAggregator
collectBucketValue
in class BucketMetricsPipelineAggregator
bucketKey
- the key for this bucket as a StringbucketValue
- the value of the metric specified in bucketsPath
for this bucketprotected InternalAggregation buildAggregation(List<PipelineAggregator> pipelineAggregators, Map<String,Object> metadata)
BucketMetricsPipelineAggregator
buildAggregation
in class BucketMetricsPipelineAggregator
pipelineAggregators
- the pipeline aggregators to add to the resulting aggregationmetadata
- the metadata to add to the resulting aggregationCopyright © 2009–2016. All rights reserved.