Interface VertexStatsTracker<T extends Statistics>
-
- Type Parameters:
T
- Type of statistics to track
- All Known Implementing Classes:
VertexThreadInfoTracker
public interface VertexStatsTracker<T extends Statistics>
Interface for a tracker of statistics forAccessExecutionJobVertex
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<T>
getExecutionVertexStats(JobID jobId, AccessExecutionJobVertex vertex, int subtaskIndex)
Returns statistics for a execution vertex.Optional<T>
getJobVertexStats(JobID jobId, AccessExecutionJobVertex vertex)
Returns statistics for a job vertex.void
shutDown()
Shuts theVertexStatsTracker
down.
-
-
-
Method Detail
-
getJobVertexStats
Optional<T> getJobVertexStats(JobID jobId, AccessExecutionJobVertex vertex)
Returns statistics for a job vertex. Automatically triggers sampling request if statistics are not available or outdated.- Parameters:
jobId
- job the vertex belongs tovertex
- Vertex to get the stats for.- Returns:
- Statistics for a job vertex. This interface is intended to be used for polling request and for the duration while the statistics are being gathered, the returned Optional can be empty.
-
getExecutionVertexStats
Optional<T> getExecutionVertexStats(JobID jobId, AccessExecutionJobVertex vertex, int subtaskIndex)
Returns statistics for a execution vertex. Automatically triggers sampling request if statistics are not available or outdated.Note: A single subtask may have multiple attempts, it will return the result of all attempts.
- Parameters:
jobId
- job the vertex belongs tovertex
- Vertex to get the stats for.subtaskIndex
- SubtaskIndex to get the stats for.- Returns:
- Statistics for a execution vertex. This interface is intended to be used for polling request and for the duration while the statistics are being gathered, the returned Optional can be empty.
-
shutDown
void shutDown() throws FlinkException
Shuts theVertexStatsTracker
down.- Throws:
FlinkException
- if theVertexStatsTracker
could not be shut down
-
-