Class MetricStore
- java.lang.Object
-
- org.apache.flink.runtime.rest.handler.legacy.metrics.MetricStore
-
@ThreadSafe public class MetricStore extends Object
Nested data-structure to store metrics.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetricStore.ComponentMetricStore
Structure containing metrics of a single component.static class
MetricStore.SubtaskMetricStore
Sub-structure containing metrics of a single subtask.static class
MetricStore.TaskManagerMetricStore
Sub-structure containing metrics of a single TaskManager.static class
MetricStore.TaskMetricStore
Sub-structure containing metrics of a single Task.
-
Constructor Summary
Constructors Constructor Description MetricStore()
-
Method Summary
-
-
-
Method Detail
-
updateCurrentExecutionAttempts
public void updateCurrentExecutionAttempts(Collection<JobDetails> jobs)
-
getRepresentativeAttempts
public Map<String,Map<String,Map<Integer,Integer>>> getRepresentativeAttempts()
-
getJobManagerMetricStore
public MetricStore.ComponentMetricStore getJobManagerMetricStore()
Returns theMetricStore.ComponentMetricStore
for the JobManager.- Returns:
- ComponentMetricStore for the JobManager
-
getJobManagerOperatorMetricStore
public MetricStore.ComponentMetricStore getJobManagerOperatorMetricStore(String jobID, String taskID)
-
getTaskManagerMetricStore
public MetricStore.TaskManagerMetricStore getTaskManagerMetricStore(String tmID)
Returns theMetricStore.TaskManagerMetricStore
for the given taskmanager ID.- Parameters:
tmID
- taskmanager ID- Returns:
- TaskManagerMetricStore for the given ID, or null if no store for the given argument exists
-
getJobMetricStore
public MetricStore.ComponentMetricStore getJobMetricStore(String jobID)
Returns theMetricStore.ComponentMetricStore
for the given job ID.- Parameters:
jobID
- job ID- Returns:
- ComponentMetricStore for the given ID, or null if no store for the given argument exists
-
getTaskMetricStore
public MetricStore.TaskMetricStore getTaskMetricStore(String jobID, String taskID)
Returns theMetricStore.ComponentMetricStore
for the given job/task ID.- Parameters:
jobID
- job IDtaskID
- task ID- Returns:
- ComponentMetricStore for given IDs, or null if no store for the given arguments exists
-
getSubtaskMetricStore
public MetricStore.ComponentMetricStore getSubtaskMetricStore(String jobID, String taskID, int subtaskIndex)
Returns theMetricStore.ComponentMetricStore
for the given job/task ID and subtask index.- Parameters:
jobID
- job IDtaskID
- task IDsubtaskIndex
- subtask index- Returns:
- SubtaskMetricStore for the given IDs and index, or null if no store for the given arguments exists
-
getSubtaskAttemptMetricStore
public MetricStore.ComponentMetricStore getSubtaskAttemptMetricStore(String jobID, String taskID, int subtaskIndex, int attemptNumber)
-
getJobs
public Map<String,org.apache.flink.runtime.rest.handler.legacy.metrics.MetricStore.JobMetricStore> getJobs()
-
getTaskManagers
public Map<String,MetricStore.TaskManagerMetricStore> getTaskManagers()
-
add
@VisibleForTesting public void add(MetricDump metric)
-
-