Class JobMetricGroup<C extends ComponentMetricGroup<C>>
- java.lang.Object
-
- org.apache.flink.runtime.metrics.groups.AbstractMetricGroup<P>
-
- org.apache.flink.runtime.metrics.groups.ComponentMetricGroup<C>
-
- org.apache.flink.runtime.metrics.groups.JobMetricGroup<C>
-
- Type Parameters:
C
- The type of the parent ComponentMetricGroup.
- All Implemented Interfaces:
MetricGroup
- Direct Known Subclasses:
JobManagerJobMetricGroup
,TaskManagerJobMetricGroup
@Internal public abstract class JobMetricGroup<C extends ComponentMetricGroup<C>> extends ComponentMetricGroup<C>
Special abstractMetricGroup
representing everything belonging to a specific job.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.metrics.groups.AbstractMetricGroup
AbstractMetricGroup.ChildType
-
-
Field Summary
Fields Modifier and Type Field Description protected JobID
jobId
The ID of the job represented by this metrics group.protected String
jobName
The name of the job represented by this metrics group.-
Fields inherited from class org.apache.flink.runtime.metrics.groups.AbstractMetricGroup
LOG, parent, queryServiceScopeInfo, registry, variables
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JobMetricGroup(MetricRegistry registry, C parent, JobID jobId, String jobName, String[] scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSpan(SpanBuilder spanBuilder)
protected QueryScopeInfo.JobQueryScopeInfo
createQueryServiceMetricInfo(CharacterFilter filter)
Creates the metric query service scope for this group.protected String
getGroupName(CharacterFilter filter)
Returns the name for this group, meaning what kind of entity it represents, for example "taskmanager".JobID
jobId()
String
jobName()
protected void
putVariables(Map<String,String> variables)
Enters all variables specific to thisAbstractMetricGroup
and their associated values into the map.-
Methods inherited from class org.apache.flink.runtime.metrics.groups.ComponentMetricGroup
close, subComponents
-
Methods inherited from class org.apache.flink.runtime.metrics.groups.AbstractMetricGroup
addGroup, addGroup, addMetric, counter, counter, createChildGroup, createLogicalScope, gauge, getAllVariables, getAllVariables, getLogicalScope, getLogicalScope, getMetricIdentifier, getMetricIdentifier, getMetricIdentifier, getQueryServiceMetricInfo, getScopeComponents, histogram, isClosed, meter
-
-
-
-
Constructor Detail
-
JobMetricGroup
protected JobMetricGroup(MetricRegistry registry, C parent, JobID jobId, @Nullable String jobName, String[] scope)
-
-
Method Detail
-
jobId
public JobID jobId()
-
jobName
@Nullable public String jobName()
-
createQueryServiceMetricInfo
protected QueryScopeInfo.JobQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter)
Description copied from class:AbstractMetricGroup
Creates the metric query service scope for this group.- Specified by:
createQueryServiceMetricInfo
in classAbstractMetricGroup<C extends ComponentMetricGroup<C>>
- Parameters:
filter
- character filter- Returns:
- query service scope
-
addSpan
public void addSpan(SpanBuilder spanBuilder)
- Specified by:
addSpan
in interfaceMetricGroup
- Overrides:
addSpan
in classAbstractMetricGroup<C extends ComponentMetricGroup<C>>
-
putVariables
protected void putVariables(Map<String,String> variables)
Description copied from class:AbstractMetricGroup
Enters all variables specific to thisAbstractMetricGroup
and their associated values into the map.- Overrides:
putVariables
in classAbstractMetricGroup<C extends ComponentMetricGroup<C>>
- Parameters:
variables
- map to enter variables and their values into
-
getGroupName
protected String getGroupName(CharacterFilter filter)
Description copied from class:AbstractMetricGroup
Returns the name for this group, meaning what kind of entity it represents, for example "taskmanager".- Specified by:
getGroupName
in classAbstractMetricGroup<C extends ComponentMetricGroup<C>>
- Parameters:
filter
- character filter which is applied to the name- Returns:
- logical name for this group
-
-