Class AbstractReporter
- java.lang.Object
-
- org.apache.flink.metrics.reporter.AbstractReporter
-
- All Implemented Interfaces:
CharacterFilter
,MetricReporter
- Direct Known Subclasses:
Slf4jReporter
,StatsDReporter
@Public public abstract class AbstractReporter extends Object implements MetricReporter, CharacterFilter
Base interface for custom metric reporters.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Counter,String>
counters
protected Map<Gauge<?>,String>
gauges
protected Map<Histogram,String>
histograms
protected org.slf4j.Logger
log
protected Map<Meter,String>
meters
-
Fields inherited from interface org.apache.flink.metrics.CharacterFilter
NO_OP_FILTER
-
-
Constructor Summary
Constructors Constructor Description AbstractReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
notifyOfAddedMetric(Metric metric, String metricName, MetricGroup group)
Called when a newMetric
was added.void
notifyOfRemovedMetric(Metric metric, String metricName, MetricGroup group)
Called when aMetric
was removed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.metrics.CharacterFilter
filterCharacters
-
Methods inherited from interface org.apache.flink.metrics.reporter.MetricReporter
close, open
-
-
-
-
Method Detail
-
notifyOfAddedMetric
public void notifyOfAddedMetric(Metric metric, String metricName, MetricGroup group)
Description copied from interface:MetricReporter
Called when a newMetric
was added.- Specified by:
notifyOfAddedMetric
in interfaceMetricReporter
- Parameters:
metric
- the metric that was addedmetricName
- the name of the metricgroup
- the group that contains the metric
-
notifyOfRemovedMetric
public void notifyOfRemovedMetric(Metric metric, String metricName, MetricGroup group)
Description copied from interface:MetricReporter
Called when aMetric
was removed.- Specified by:
notifyOfRemovedMetric
in interfaceMetricReporter
- Parameters:
metric
- the metric that should be removedmetricName
- the name of the metricgroup
- the group that contains the metric
-
-