P
- Type of the parent metric grouppublic class ProxyMetricGroup<P extends MetricGroup> extends Object implements MetricGroup
Constructor and Description |
---|
ProxyMetricGroup(P parentMetricGroup) |
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. |
public ProxyMetricGroup(P parentMetricGroup)
public final Counter counter(int name)
MetricGroup
Counter
with Flink.counter
in interface MetricGroup
name
- name of the counterpublic final Counter counter(String name)
MetricGroup
Counter
with Flink.counter
in interface MetricGroup
name
- name of the counterpublic final <C extends Counter> C counter(int name, C counter)
MetricGroup
Counter
with Flink.counter
in interface MetricGroup
C
- counter typename
- name of the countercounter
- counter to registerpublic final <C extends Counter> C counter(String name, C counter)
MetricGroup
Counter
with Flink.counter
in interface MetricGroup
C
- counter typename
- name of the countercounter
- counter to registerpublic final <T,G extends Gauge<T>> G gauge(int name, G gauge)
MetricGroup
Gauge
with Flink.gauge
in interface MetricGroup
T
- return type of the gaugename
- name of the gaugegauge
- gauge to registerpublic final <T,G extends Gauge<T>> G gauge(String name, G gauge)
MetricGroup
Gauge
with Flink.gauge
in interface MetricGroup
T
- return type of the gaugename
- name of the gaugegauge
- gauge to registerpublic final <H extends Histogram> H histogram(String name, H histogram)
MetricGroup
Histogram
with Flink.histogram
in interface MetricGroup
H
- histogram typename
- name of the histogramhistogram
- histogram to registerpublic final <H extends Histogram> H histogram(int name, H histogram)
MetricGroup
Histogram
with Flink.histogram
in interface MetricGroup
H
- histogram typename
- name of the histogramhistogram
- histogram to registerpublic final MetricGroup addGroup(int name)
MetricGroup
addGroup
in interface MetricGroup
name
- name of the grouppublic final MetricGroup addGroup(String name)
MetricGroup
addGroup
in interface MetricGroup
name
- name of the grouppublic String[] getScopeComponents()
MetricGroup
["host-7", "taskmanager-2", "window_word_count", "my-mapper"]
getScopeComponents
in interface MetricGroup
MetricGroup.getMetricIdentifier(String)
,
MetricGroup.getMetricIdentifier(String, CharacterFilter)
public String getMetricIdentifier(String metricName)
MetricGroup
"host-7.taskmanager-2.window_word_count.my-mapper.metricName"
getMetricIdentifier
in interface MetricGroup
metricName
- metric namepublic String getMetricIdentifier(String metricName, CharacterFilter filter)
MetricGroup
"host-7.taskmanager-2.window_word_count.my-mapper.metricName"
getMetricIdentifier
in interface MetricGroup
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.