public interface MetricGroup
Metrics
and further metric subgroups.
Instances of this class can be used to register new metrics with Flink and to create a nested hierarchy based on the group names.
A MetricGroup is uniquely identified by it's place in the hierarchy and name.
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.
|
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. |
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. |
Counter counter(int name)
Counter
with Flink.name
- name of the counterCounter counter(String name)
Counter
with Flink.name
- name of the counter<C extends Counter> C counter(int name, C counter)
Counter
with Flink.C
- counter typename
- name of the countercounter
- counter to register<C extends Counter> C counter(String name, C counter)
Counter
with Flink.C
- counter typename
- name of the countercounter
- counter to register<T,G extends Gauge<T>> G gauge(int name, G gauge)
Gauge
with Flink.T
- return type of the gaugename
- name of the gaugegauge
- gauge to register<T,G extends Gauge<T>> G gauge(String name, G gauge)
Gauge
with Flink.T
- return type of the gaugename
- name of the gaugegauge
- gauge to register<H extends Histogram> H histogram(String name, H histogram)
Histogram
with Flink.H
- histogram typename
- name of the histogramhistogram
- histogram to register<H extends Histogram> H histogram(int name, H histogram)
Histogram
with Flink.H
- histogram typename
- name of the histogramhistogram
- histogram to registerMetricGroup addGroup(int name)
name
- name of the groupMetricGroup addGroup(String name)
name
- name of the groupString[] getScopeComponents()
["host-7", "taskmanager-2", "window_word_count", "my-mapper"]
String getMetricIdentifier(String metricName)
"host-7.taskmanager-2.window_word_count.my-mapper.metricName"
metricName
- metric nameString getMetricIdentifier(String metricName, CharacterFilter filter)
"host-7.taskmanager-2.window_word_count.my-mapper.metricName"
metricName
- metric namefilter
- character filter which is applied to the scope components if not null.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.