From c1cffba34951383854098ad160a36f842129e8fa Mon Sep 17 00:00:00 2001 From: Rick Cheng Date: Wed, 12 Jul 2023 21:03:41 +0800 Subject: [PATCH] [Improvement] Remove the unused newDaemonSingleThreadExecutor (#14520) --- .../plugin/task/api/AbstractCommandExecutor.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java index 17c52084ad..0967c642fc 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java @@ -44,10 +44,8 @@ import java.util.LinkedList; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import java.util.regex.Matcher; @@ -55,7 +53,6 @@ import java.util.regex.Pattern; import org.slf4j.Logger; -import com.google.common.util.concurrent.ThreadFactoryBuilder; import io.fabric8.kubernetes.client.dsl.LogWatch; /** @@ -453,13 +450,5 @@ public abstract class AbstractCommandExecutor { protected abstract void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException; - ExecutorService newDaemonSingleThreadExecutor(String threadName) { - ThreadFactory threadFactory = new ThreadFactoryBuilder() - .setDaemon(true) - .setNameFormat(threadName) - .build(); - return Executors.newSingleThreadExecutor(threadFactory); - } - protected abstract String commandInterpreter(); }