public abstract class BucketMetricsPipelineAggregator extends SiblingPipelineAggregator
PipelineAggregator.Parser| Modifier and Type | Field and Description |
|---|---|
protected ValueFormatter |
formatter |
protected BucketHelpers.GapPolicy |
gapPolicy |
AGGREGATION_TRANFORM_FUNCTION| Modifier | Constructor and Description |
|---|---|
|
BucketMetricsPipelineAggregator() |
protected |
BucketMetricsPipelineAggregator(String name,
String[] bucketsPaths,
BucketHelpers.GapPolicy gapPolicy,
ValueFormatter formatter,
Map<String,Object> metaData) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract 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 abstract 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
|
void |
doReadFrom(StreamInput in) |
InternalAggregation |
doReduce(Aggregations aggregations,
InternalAggregation.ReduceContext context) |
void |
doWriteTo(StreamOutput out) |
protected void |
innerReadFrom(StreamInput in) |
protected void |
innerWriteTo(StreamOutput out) |
protected void |
preCollection()
Called before initial collection and between successive collection runs.
|
reducebucketsPaths, metaData, name, readFrom, type, writeToprotected ValueFormatter formatter
protected BucketHelpers.GapPolicy gapPolicy
public BucketMetricsPipelineAggregator()
protected BucketMetricsPipelineAggregator(String name, String[] bucketsPaths, BucketHelpers.GapPolicy gapPolicy, ValueFormatter formatter, Map<String,Object> metaData)
public final InternalAggregation doReduce(Aggregations aggregations, InternalAggregation.ReduceContext context)
doReduce in class SiblingPipelineAggregatorprotected void preCollection()
protected abstract InternalAggregation buildAggregation(List<PipelineAggregator> pipelineAggregators, Map<String,Object> metadata)
pipelineAggregators - the pipeline aggregators to add to the resulting aggregationmetadata - the metadata to add to the resulting aggregationprotected abstract void collectBucketValue(String bucketKey, Double bucketValue)
bucketKey - the key for this bucket as a StringbucketValue - the value of the metric specified in bucketsPath
for this bucketpublic final void doReadFrom(StreamInput in) throws IOException
doReadFrom in class PipelineAggregatorIOExceptionprotected void innerReadFrom(StreamInput in) throws IOException
IOExceptionpublic final void doWriteTo(StreamOutput out) throws IOException
doWriteTo in class PipelineAggregatorIOExceptionprotected void innerWriteTo(StreamOutput out) throws IOException
IOExceptionCopyright © 2009–2017. All rights reserved.