Package alluxio.metrics.aggregator
Class SingleTagValueAggregator
- java.lang.Object
-
- alluxio.metrics.aggregator.SingleTagValueAggregator
-
- All Implemented Interfaces:
MultiValueMetricsAggregator
public class SingleTagValueAggregator extends java.lang.Object implements MultiValueMetricsAggregator
An aggregator that aggregates the metrics into multiple values based on a single tag of the metric.
-
-
Constructor Summary
Constructors Constructor Description SingleTagValueAggregator(java.lang.String aggregationName, java.lang.String metricName, java.lang.String tagName)
Constructs a new instance ofSingleTagValueAggregator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFilterMetricName()
long
getValue(java.lang.String name)
Gets the metric value of the given fully qualified metric name.java.util.Map<java.lang.String,java.lang.Long>
updateValues(java.util.Set<Metric> set)
Updates the aggregated values from the filtered metrics.
-
-
-
Constructor Detail
-
SingleTagValueAggregator
public SingleTagValueAggregator(java.lang.String aggregationName, java.lang.String metricName, java.lang.String tagName)
Constructs a new instance ofSingleTagValueAggregator
.- Parameters:
aggregationName
- the aggregated metric namemetricName
- metric nametagName
- tag name
-
-
Method Detail
-
getFilterMetricName
public java.lang.String getFilterMetricName()
- Specified by:
getFilterMetricName
in interfaceMultiValueMetricsAggregator
- Returns:
- the metric name to use for filter metrics
-
updateValues
public java.util.Map<java.lang.String,java.lang.Long> updateValues(java.util.Set<Metric> set)
Description copied from interface:MultiValueMetricsAggregator
Updates the aggregated values from the filtered metrics. The values of map will be the filtered metrics using the metric name defined inMultiValueMetricsAggregator.getFilterMetricName()
. The returned values are organized as a map from the metric name to metric value.- Specified by:
updateValues
in interfaceMultiValueMetricsAggregator
- Parameters:
set
- a map of metric name to the set of metrics that have the metric name- Returns:
- the aggregated values
-
getValue
public long getValue(java.lang.String name)
Description copied from interface:MultiValueMetricsAggregator
Gets the metric value of the given fully qualified metric name.- Specified by:
getValue
in interfaceMultiValueMetricsAggregator
- Parameters:
name
- the fully qualified metric name- Returns:
- the metric value, 0 if the metric name does not exist
-
-