AHeise commented on a change in pull request #15054: URL: https://github.com/apache/flink/pull/15054#discussion_r605112597
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java ########## @@ -497,6 +505,32 @@ private void stopTaskExecutorServices() throws Exception { // RPC methods // ====================================================================== + @Override + public CompletableFuture<TaskThreadInfoResponse> requestThreadInfoSamples( + final ExecutionAttemptID taskExecutionAttemptId, + final ThreadInfoSamplesRequest requestParams, + final Time timeout) { + + final Task task = taskSlotTable.getTask(taskExecutionAttemptId); + if (task == null) { + return FutureUtils.completedExceptionally( + new IllegalStateException( + String.format( + "Cannot sample task %s. " + + "Task is not known to the task manager.", + taskExecutionAttemptId))); + } + + final CompletableFuture<List<ThreadInfoSample>> stackTracesFuture = + threadInfoSampleService.requestThreadInfoSamples( + SampleableTaskAdapter.fromTask(task), requestParams); + + return stackTracesFuture.thenApply( + stackTraces -> + new TaskThreadInfoResponse( + requestParams.getRequestId(), taskExecutionAttemptId, stackTraces)); Review comment: Removed request id entirely, -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org