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:
org.apache.flink.metrics.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 org.apache.flink.api.common.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, org.apache.flink.api.common.JobID jobId, String jobName, String[] scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSpan(org.apache.flink.traces.SpanBuilder spanBuilder)
protected QueryScopeInfo.JobQueryScopeInfo
createQueryServiceMetricInfo(org.apache.flink.metrics.CharacterFilter filter)
Creates the metric query service scope for this group.protected String
getGroupName(org.apache.flink.metrics.CharacterFilter filter)
Returns the name for this group, meaning what kind of entity it represents, for example "taskmanager".org.apache.flink.api.common.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
-
-
-
-
Field Detail
-
jobId
protected final org.apache.flink.api.common.JobID jobId
The ID of the job represented by this metrics group.
-
jobName
@Nullable protected final String jobName
The name of the job represented by this metrics group.
-
-
Constructor Detail
-
JobMetricGroup
protected JobMetricGroup(MetricRegistry registry, C parent, org.apache.flink.api.common.JobID jobId, @Nullable String jobName, String[] scope)
-
-
Method Detail
-
jobId
public org.apache.flink.api.common.JobID jobId()
-
jobName
@Nullable public String jobName()
-
createQueryServiceMetricInfo
protected QueryScopeInfo.JobQueryScopeInfo createQueryServiceMetricInfo(org.apache.flink.metrics.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(org.apache.flink.traces.SpanBuilder spanBuilder)
- Specified by:
addSpan
in interfaceorg.apache.flink.metrics.MetricGroup
- 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(org.apache.flink.metrics.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
-
-