Package org.apache.flink.metrics
Interface LogicalScopeProvider
-
- All Known Implementing Classes:
FrontMetricGroup
@Public public interface LogicalScopeProvider
Extension for metric groups that support logical scopes.ATTENTION: This interface is *not* meant for the long-term; it merely removes the need for reporters to depend on flink-runtime in order to access the logical scope. Once the logical scope is properly exposed this interface *will* be removed.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static LogicalScopeProvider
castFrom(MetricGroup metricGroup)
Casts the given metric group to aLogicalScopeProvider
, if it implements the interface.String
getLogicalScope(CharacterFilter filter)
Returns the logical scope for the metric group, for example"taskmanager.job.task"
, with the given filter being applied to all scope components.String
getLogicalScope(CharacterFilter filter, char delimiter)
Returns the logical scope for the metric group, for example"taskmanager.job.task"
, with the given filter being applied to all scope components and the given delimiter being used to concatenate scope components.MetricGroup
getWrappedMetricGroup()
Returns the underlying metric group.
-
-
-
Method Detail
-
getLogicalScope
String getLogicalScope(CharacterFilter filter)
Returns the logical scope for the metric group, for example"taskmanager.job.task"
, with the given filter being applied to all scope components.- Parameters:
filter
- filter to apply to all scope components- Returns:
- logical scope
-
getLogicalScope
String getLogicalScope(CharacterFilter filter, char delimiter)
Returns the logical scope for the metric group, for example"taskmanager.job.task"
, with the given filter being applied to all scope components and the given delimiter being used to concatenate scope components.- Parameters:
filter
- filter to apply to all scope componentsdelimiter
- delimiter to use for concatenating scope components- Returns:
- logical scope
-
getWrappedMetricGroup
MetricGroup getWrappedMetricGroup()
Returns the underlying metric group.
-
castFrom
static LogicalScopeProvider castFrom(MetricGroup metricGroup) throws IllegalStateException
Casts the given metric group to aLogicalScopeProvider
, if it implements the interface.- Parameters:
metricGroup
- metric group to cast- Returns:
- cast metric group
- Throws:
IllegalStateException
- if the metric group did not implement the LogicalScopeProvider interface
-
-