@Internal public class TaskManagerMetricGroup extends ComponentMetricGroup<TaskManagerMetricGroup>
MetricGroup
representing a TaskManager.
Contains extra logic for adding jobs with tasks, and removing jobs when they do not contain tasks any more
AbstractMetricGroup.ChildType
LOG, parent, queryServiceScopeInfo, registry, variables
Modifier and Type | Method and Description |
---|---|
TaskManagerJobMetricGroup |
addJob(JobID jobId,
String jobName) |
protected QueryScopeInfo.TaskManagerQueryScopeInfo |
createQueryServiceMetricInfo(CharacterFilter filter)
Creates the metric query service scope for this group.
|
static TaskManagerMetricGroup |
createTaskManagerMetricGroup(MetricRegistry metricRegistry,
String hostName,
ResourceID resourceID) |
protected String |
getGroupName(CharacterFilter filter)
Returns the name for this group, meaning what kind of entity it represents, for example
"taskmanager".
|
TaskManagerJobMetricGroup |
getJobMetricsGroup(JobID jobId) |
String |
hostname() |
int |
numRegisteredJobMetricGroups() |
protected void |
putVariables(Map<String,String> variables)
Enters all variables specific to this
AbstractMetricGroup and their associated values
into the map. |
void |
removeJobMetricsGroup(JobID jobId) |
protected Iterable<? extends ComponentMetricGroup> |
subComponents()
Gets all component metric groups that are contained in this component metric group.
|
String |
taskManagerId() |
close
addGroup, addGroup, addMetric, addSpan, counter, counter, createChildGroup, createLogicalScope, gauge, getAllVariables, getAllVariables, getLogicalScope, getLogicalScope, getMetricIdentifier, getMetricIdentifier, getMetricIdentifier, getQueryServiceMetricInfo, getScopeComponents, histogram, isClosed, meter
public static TaskManagerMetricGroup createTaskManagerMetricGroup(MetricRegistry metricRegistry, String hostName, ResourceID resourceID)
public String hostname()
public String taskManagerId()
protected QueryScopeInfo.TaskManagerQueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter)
AbstractMetricGroup
createQueryServiceMetricInfo
in class AbstractMetricGroup<TaskManagerMetricGroup>
filter
- character filterpublic TaskManagerJobMetricGroup addJob(JobID jobId, String jobName)
@VisibleForTesting public TaskManagerJobMetricGroup getJobMetricsGroup(JobID jobId)
public void removeJobMetricsGroup(JobID jobId)
public int numRegisteredJobMetricGroups()
protected void putVariables(Map<String,String> variables)
AbstractMetricGroup
AbstractMetricGroup
and their associated values
into the map.putVariables
in class AbstractMetricGroup<TaskManagerMetricGroup>
variables
- map to enter variables and their values intoprotected Iterable<? extends ComponentMetricGroup> subComponents()
ComponentMetricGroup
subComponents
in class ComponentMetricGroup<TaskManagerMetricGroup>
protected String getGroupName(CharacterFilter filter)
AbstractMetricGroup
getGroupName
in class AbstractMetricGroup<TaskManagerMetricGroup>
filter
- character filter which is applied to the nameCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.