Class TaskMetricGroup
java.lang.Object
org.apache.flink.runtime.metrics.groups.AbstractMetricGroup<P>
org.apache.flink.runtime.metrics.groups.ComponentMetricGroup<TaskManagerJobMetricGroup>
org.apache.flink.runtime.metrics.groups.TaskMetricGroup
- All Implemented Interfaces:
org.apache.flink.metrics.MetricGroup
- Direct Known Subclasses:
UnregisteredMetricGroups.UnregisteredTaskMetricGroup
Special
MetricGroup representing a Flink runtime Task.
Contains extra logic for adding operators.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.runtime.metrics.groups.AbstractMetricGroup
AbstractMetricGroup.ChildType -
Field Summary
FieldsFields inherited from class org.apache.flink.runtime.metrics.groups.AbstractMetricGroup
LOG, parent, queryServiceScopeInfo, registry, variables -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()Closes the component group by removing and closing all metrics and subgroups (inherited fromAbstractMetricGroup), plus closing and removing all dedicated component subgroups.protected QueryScopeInfo.TaskQueryScopeInfocreateQueryServiceMetricInfo(org.apache.flink.metrics.CharacterFilter filter) Creates the metric query service scope for this group.protected StringgetGroupName(org.apache.flink.metrics.CharacterFilter filter) Returns the name for this group, meaning what kind of entity it represents, for example "taskmanager".Returns the TaskIOMetricGroup for this task.getOrAddOperator(String operatorName) getOrAddOperator(OperatorID operatorID, String operatorName) parent()protected voidputVariables(Map<String, String> variables) Enters all variables specific to thisAbstractMetricGroupand their associated values into the map.protected Iterable<? extends ComponentMetricGroup>Gets all component metric groups that are contained in this component metric group.inttaskName()org.apache.flink.util.AbstractIDvertexId()Methods inherited from class org.apache.flink.runtime.metrics.groups.AbstractMetricGroup
addGroup, addGroup, addMetric, addSpan, counter, counter, createChildGroup, createLogicalScope, gauge, getAllVariables, getAllVariables, getLogicalScope, getLogicalScope, getMetricIdentifier, getMetricIdentifier, getMetricIdentifier, getQueryServiceMetricInfo, getScopeComponents, histogram, isClosed, meterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.metrics.MetricGroup
addGroup, counter, counter, gauge, histogram, meter
-
Field Details
-
vertexId
-
subtaskIndex
protected final int subtaskIndex
-
-
Method Details
-
parent
-
executionId
-
vertexId
@Nullable public org.apache.flink.util.AbstractID vertexId() -
taskName
-
subtaskIndex
public int subtaskIndex() -
attemptNumber
public int attemptNumber() -
getIOMetricGroup
Returns the TaskIOMetricGroup for this task.- Returns:
- TaskIOMetricGroup for this task.
-
createQueryServiceMetricInfo
protected QueryScopeInfo.TaskQueryScopeInfo createQueryServiceMetricInfo(org.apache.flink.metrics.CharacterFilter filter) Description copied from class:AbstractMetricGroupCreates the metric query service scope for this group.- Specified by:
createQueryServiceMetricInfoin classAbstractMetricGroup<TaskManagerJobMetricGroup>- Parameters:
filter- character filter- Returns:
- query service scope
-
getOrAddOperator
-
getOrAddOperator
-
close
public void close()Description copied from class:ComponentMetricGroupCloses the component group by removing and closing all metrics and subgroups (inherited fromAbstractMetricGroup), plus closing and removing all dedicated component subgroups.- Overrides:
closein classComponentMetricGroup<TaskManagerJobMetricGroup>
-
putVariables
Description copied from class:AbstractMetricGroupEnters all variables specific to thisAbstractMetricGroupand their associated values into the map.- Overrides:
putVariablesin classAbstractMetricGroup<TaskManagerJobMetricGroup>- Parameters:
variables- map to enter variables and their values into
-
subComponents
Description copied from class:ComponentMetricGroupGets all component metric groups that are contained in this component metric group.- Specified by:
subComponentsin classComponentMetricGroup<TaskManagerJobMetricGroup>- Returns:
- All component metric groups that are contained in this component metric group.
-
getGroupName
Description copied from class:AbstractMetricGroupReturns the name for this group, meaning what kind of entity it represents, for example "taskmanager".- Specified by:
getGroupNamein classAbstractMetricGroup<TaskManagerJobMetricGroup>- Parameters:
filter- character filter which is applied to the name- Returns:
- logical name for this group
-