Skip to content

Commit

Permalink
[dingo-exec] change new threadPool each time to CacheThreadPool
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjie0303 authored and astor-oss committed Mar 4, 2022
1 parent 681789d commit 2b92378
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dingo-exec/src/main/java/io/dingodb/exec/impl/TaskImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public final class TaskImpl implements Task {
@Getter
private final List<Id> runList;

private static ExecutorService executorService = Executors.newCachedThreadPool();

@JsonCreator
public TaskImpl(
@JsonProperty("jobId") String jobId,
Expand Down Expand Up @@ -102,7 +104,6 @@ public void deleteOperator(@Nonnull Operator operator) {

public void run() {
log.info("Task is starting at {}...", location);
ExecutorService executorService = Executors.newFixedThreadPool(runList.size());
runList.forEach(id -> {
final Operator operator = operators.get(id);
assert operator instanceof SourceOperator
Expand Down

0 comments on commit 2b92378

Please # to comment.