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(org.apache.flink.api.common.JobID jobId, AccessExecutionJobVertex vertex, int subtaskIndex)Returns statistics for a execution vertex.Optional<T>getJobVertexStats(org.apache.flink.api.common.JobID jobId, AccessExecutionJobVertex vertex)Returns statistics for a job vertex.voidshutDown()Shuts theVertexStatsTrackerdown.
-
-
-
Method Detail
-
getJobVertexStats
Optional<T> getJobVertexStats(org.apache.flink.api.common.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(org.apache.flink.api.common.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 org.apache.flink.util.FlinkExceptionShuts theVertexStatsTrackerdown.- Throws:
org.apache.flink.util.FlinkException- if theVertexStatsTrackercould not be shut down
-
-