public class UnregisteredMetricsGroup extends Object implements MetricGroup
MetricGroup that does not register any metrics at the metrics registry
and any reporters.| Constructor and Description |
|---|
UnregisteredMetricsGroup() |
| Modifier and Type | Method and Description |
|---|---|
MetricGroup |
addGroup(int name)
Creates a new MetricGroup and adds it to this groups sub-groups.
|
MetricGroup |
addGroup(String name)
Creates a new MetricGroup and adds it to this groups sub-groups.
|
MetricGroup |
addGroup(String key,
String value)
Creates a new key-value MetricGroup pair.
|
Counter |
counter(int name)
Creates and registers a new
Counter with Flink. |
<C extends Counter> |
counter(int name,
C counter)
Registers a
Counter with Flink. |
Counter |
counter(String name)
Creates and registers a new
Counter with Flink. |
<C extends Counter> |
counter(String name,
C counter)
Registers a
Counter with Flink. |
<T,G extends Gauge<T>> |
gauge(int name,
G gauge)
Registers a new
Gauge with Flink. |
<T,G extends Gauge<T>> |
gauge(String name,
G gauge)
Registers a new
Gauge with Flink. |
Map<String,String> |
getAllVariables()
Returns a map of all variables and their associated value, for example
{"<host>"="host-7", "<tm_id>"="taskmanager-2"}. |
String |
getMetricIdentifier(String metricName)
Returns the fully qualified metric name, for example
"host-7.taskmanager-2.window_word_count.my-mapper.metricName". |
String |
getMetricIdentifier(String metricName,
CharacterFilter filter)
Returns the fully qualified metric name, for example
"host-7.taskmanager-2.window_word_count.my-mapper.metricName". |
String[] |
getScopeComponents()
Gets the scope as an array of the scope components, for example
["host-7", "taskmanager-2", "window_word_count", "my-mapper"]. |
<H extends Histogram> |
histogram(int name,
H histogram)
Registers a new
Histogram with Flink. |
<H extends Histogram> |
histogram(String name,
H histogram)
Registers a new
Histogram with Flink. |
<M extends Meter> |
meter(int name,
M meter)
Registers a new
Meter with Flink. |
<M extends Meter> |
meter(String name,
M meter)
Registers a new
Meter with Flink. |
public Counter counter(int name)
MetricGroupCounter with Flink.counter in interface MetricGroupname - name of the counterpublic Counter counter(String name)
MetricGroupCounter with Flink.counter in interface MetricGroupname - name of the counterpublic <C extends Counter> C counter(int name, C counter)
MetricGroupCounter with Flink.counter in interface MetricGroupC - counter typename - name of the countercounter - counter to registerpublic <C extends Counter> C counter(String name, C counter)
MetricGroupCounter with Flink.counter in interface MetricGroupC - counter typename - name of the countercounter - counter to registerpublic <T,G extends Gauge<T>> G gauge(int name, G gauge)
MetricGroupGauge with Flink.gauge in interface MetricGroupT - return type of the gaugename - name of the gaugegauge - gauge to registerpublic <T,G extends Gauge<T>> G gauge(String name, G gauge)
MetricGroupGauge with Flink.gauge in interface MetricGroupT - return type of the gaugename - name of the gaugegauge - gauge to registerpublic <H extends Histogram> H histogram(int name, H histogram)
MetricGroupHistogram with Flink.histogram in interface MetricGroupH - histogram typename - name of the histogramhistogram - histogram to registerpublic <M extends Meter> M meter(String name, M meter)
MetricGroupMeter with Flink.meter in interface MetricGroupM - meter typename - name of the metermeter - meter to registerpublic <M extends Meter> M meter(int name, M meter)
MetricGroupMeter with Flink.meter in interface MetricGroupM - meter typename - name of the metermeter - meter to registerpublic <H extends Histogram> H histogram(String name, H histogram)
MetricGroupHistogram with Flink.histogram in interface MetricGroupH - histogram typename - name of the histogramhistogram - histogram to registerpublic MetricGroup addGroup(int name)
MetricGroupaddGroup in interface MetricGroupname - name of the grouppublic MetricGroup addGroup(String name)
MetricGroupaddGroup in interface MetricGroupname - name of the grouppublic MetricGroup addGroup(String key, String value)
MetricGroupThe only difference between calling this method and group.addGroup(key).addGroup(value) is that
MetricGroup.getAllVariables() of the value group return an additional "<key>"="value" pair.
addGroup in interface MetricGroupkey - name of the first groupvalue - name of the second grouppublic String[] getScopeComponents()
MetricGroup["host-7", "taskmanager-2", "window_word_count", "my-mapper"].getScopeComponents in interface MetricGroupMetricGroup.getMetricIdentifier(String),
MetricGroup.getMetricIdentifier(String, CharacterFilter)public Map<String,String> getAllVariables()
MetricGroup{"<host>"="host-7", "<tm_id>"="taskmanager-2"}.getAllVariables in interface MetricGrouppublic String getMetricIdentifier(String metricName)
MetricGroup"host-7.taskmanager-2.window_word_count.my-mapper.metricName".getMetricIdentifier in interface MetricGroupmetricName - metric namepublic String getMetricIdentifier(String metricName, CharacterFilter filter)
MetricGroup"host-7.taskmanager-2.window_word_count.my-mapper.metricName".getMetricIdentifier in interface MetricGroupmetricName - metric namefilter - character filter which is applied to the scope components if not null.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.