wsjz commented on code in PR #26356:
URL: https://github.com/apache/doris/pull/26356#discussion_r1434742971
##########
fe/fe-core/src/main/java/org/apache/doris/job/base/AbstractJob.java:
##########
@@ -154,17 +201,18 @@ public List<T> commonCreateTasks(TaskType taskType, C
taskContext) {
return createTasks(taskType, taskContext);
}
- public void initTasks(List<? extends AbstractTask> tasks) {
+ public void initTasks(Collection<? extends T> tasks, TaskType taskType) {
+ if (CollectionUtils.isEmpty(getRunningTasks())) {
+ runningTasks = new ArrayList<>();
+ }
tasks.forEach(task -> {
- task.setJobId(jobId);
- task.setTaskId(getNextId());
+ task.setTaskType(taskType);
+ task.setJobId(getJobId());
Review Comment:
set task id in task constructor, I think all these should put into its own
constructor, not put elsewhere
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]