CalvinKirs commented on code in PR #27703: URL: https://github.com/apache/doris/pull/27703#discussion_r1411670922
########## fe/fe-core/src/main/java/org/apache/doris/job/base/AbstractJob.java: ########## @@ -107,6 +110,27 @@ public void cancelTaskById(long taskId) throws JobException { .orElseThrow(() -> new JobException("no task id:" + taskId)).cancel(); } + public List<T> queryAllTasks() { + List<T> tasks = new ArrayList<>(); + if (CollectionUtils.isEmpty(runningTasks)) { + return queryTasks(); + } + + List<T> historyTasks = queryTasks(); + if (CollectionUtils.isNotEmpty(historyTasks)) { + tasks.addAll(historyTasks); + } + Map<Long, T> loadTask = tasks.stream().collect(Collectors.toMap(AbstractTask::getTaskId, a -> a)); Review Comment: the key is an index, -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org