Class ThreadInfoRequestCoordinator
- java.lang.Object
-
- org.apache.flink.runtime.webmonitor.stats.TaskStatsRequestCoordinator<Map<ExecutionAttemptID,Collection<ThreadInfoSample>>,VertexThreadInfoStats>
-
- org.apache.flink.runtime.webmonitor.threadinfo.ThreadInfoRequestCoordinator
-
public class ThreadInfoRequestCoordinator extends TaskStatsRequestCoordinator<Map<ExecutionAttemptID,Collection<ThreadInfoSample>>,VertexThreadInfoStats>
A coordinator for triggering and collecting thread info stats of running job vertex subtasks.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.webmonitor.stats.TaskStatsRequestCoordinator
TaskStatsRequestCoordinator.PendingStatsRequest<T,V>
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.webmonitor.stats.TaskStatsRequestCoordinator
executor, isShutDown, lock, log, NUM_GHOST_SAMPLE_IDS, pendingRequests, recentPendingRequestIds, requestIdCounter, requestTimeout
-
-
Constructor Summary
Constructors Constructor Description ThreadInfoRequestCoordinator(Executor executor, Duration requestTimeout)
Creates a new coordinator for the job.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<VertexThreadInfoStats>
triggerThreadInfoRequest(Map<org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableSet<ExecutionAttemptID>,CompletableFuture<TaskExecutorThreadInfoGateway>> executionsWithGateways, int numSamples, Duration delayBetweenSamples, int maxStackTraceDepth)
Triggers collection of thread info stats of a job vertex by combining thread info responses from given subtasks.-
Methods inherited from class org.apache.flink.runtime.webmonitor.stats.TaskStatsRequestCoordinator
getNumberOfPendingRequests, handleFailedResponse, handleSuccessfulResponse, shutDown
-
-
-
-
Constructor Detail
-
ThreadInfoRequestCoordinator
public ThreadInfoRequestCoordinator(Executor executor, Duration requestTimeout)
Creates a new coordinator for the job.- Parameters:
executor
- Used to execute the futures.requestTimeout
- Time out after the expected sampling duration. This is added to the expected duration of a request, which is determined by the number of samples and the delay between each sample.
-
-
Method Detail
-
triggerThreadInfoRequest
public CompletableFuture<VertexThreadInfoStats> triggerThreadInfoRequest(Map<org.apache.flink.shaded.guava32.com.google.common.collect.ImmutableSet<ExecutionAttemptID>,CompletableFuture<TaskExecutorThreadInfoGateway>> executionsWithGateways, int numSamples, Duration delayBetweenSamples, int maxStackTraceDepth)
Triggers collection of thread info stats of a job vertex by combining thread info responses from given subtasks. A thread info response of a subtask in turn consists ofnumSamples
, collected withdelayBetweenSamples
milliseconds delay between them.- Parameters:
executionsWithGateways
- Execution attempts together with TaskExecutors running them.numSamples
- Number of thread info samples to collect from each subtask.delayBetweenSamples
- Delay between consecutive samples (ms).maxStackTraceDepth
- Maximum depth of the stack traces collected within thread info samples.- Returns:
- A future of the completed thread info stats.
-
-