afedulov commented on code in PR #19228:
URL: https://github.com/apache/flink/pull/19228#discussion_r853527526
##########
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java:
##########
@@ -545,23 +545,29 @@ private void stopTaskExecutorServices() throws Exception {
@Override
public CompletableFuture<TaskThreadInfoResponse> requestThreadInfoSamples(
- final ExecutionAttemptID taskExecutionAttemptId,
+ final Set<ExecutionAttemptID> taskExecutionAttemptIds,
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 Collection<Task> tasks = new ArrayList<>();
+ for (ExecutionAttemptID executionAttemptId : taskExecutionAttemptIds) {
+ final Task task = taskSlotTable.getTask(executionAttemptId);
+ if (task == null) {
+ log.warn(
+ String.format(
+ "Cannot sample task %s. "
+ + "Task is not known to the task
manager.",
+ executionAttemptId));
+ } else {
+ tasks.add(task);
+ }
}
+ Set<SampleableTask> sampleableTasks =
Review Comment:
Converted to List.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]