diff --git a/dolphinscheduler-server/pom.xml b/dolphinscheduler-server/pom.xml index 7c59fb6955..c3a5069208 100644 --- a/dolphinscheduler-server/pom.xml +++ b/dolphinscheduler-server/pom.xml @@ -42,6 +42,11 @@ org.apache.dolphinscheduler dolphinscheduler-spi + + org.apache.dolphinscheduler + dolphinscheduler-task-api + ${project.version} + org.apache.httpcomponents httpclient diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/TaskExecutionContextCacheManager.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/TaskExecutionContextCacheManager.java deleted file mode 100644 index 71c795b0a3..0000000000 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/TaskExecutionContextCacheManager.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.dolphinscheduler.server.worker.cache; - -import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; - -/** - * TaskExecutionContextCacheManager - */ -public interface TaskExecutionContextCacheManager { - - /** - * get taskInstance by taskInstance id - * - * @param taskInstanceId taskInstanceId - * @return taskInstance - */ - TaskExecutionContext getByTaskInstanceId(Integer taskInstanceId); - - /** - * cache taskInstance - * - * @param taskExecutionContext taskExecutionContext - */ - void cacheTaskExecutionContext(TaskExecutionContext taskExecutionContext); - - /** - * remove taskInstance by taskInstanceId - * - * @param taskInstanceId taskInstanceId - */ - void removeByTaskInstanceId(Integer taskInstanceId); - - /** - * If the value for the specified key is present and non-null,then perform the update,otherwise it will return false - * - * @param taskExecutionContext taskExecutionContext - * @return status - */ - boolean updateTaskExecutionContext(TaskExecutionContext taskExecutionContext); -} diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/impl/TaskExecutionContextCacheManagerImpl.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/impl/TaskExecutionContextCacheManagerImpl.java deleted file mode 100644 index 5c3f9904b6..0000000000 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/impl/TaskExecutionContextCacheManagerImpl.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.dolphinscheduler.server.worker.cache.impl; - -import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; -import org.apache.dolphinscheduler.server.worker.cache.TaskExecutionContextCacheManager; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import org.springframework.stereotype.Service; - -/** - * TaskExecutionContextCache - */ -@Service -public class TaskExecutionContextCacheManagerImpl implements TaskExecutionContextCacheManager { - - - /** - * taskInstance cache - */ - private Map taskExecutionContextCache = new ConcurrentHashMap<>(); - - /** - * get taskInstance by taskInstance id - * - * @param taskInstanceId taskInstanceId - * @return taskInstance - */ - @Override - public TaskExecutionContext getByTaskInstanceId(Integer taskInstanceId) { - return taskExecutionContextCache.get(taskInstanceId); - } - - /** - * cache taskInstance - * - * @param taskExecutionContext taskExecutionContext - */ - @Override - public void cacheTaskExecutionContext(TaskExecutionContext taskExecutionContext) { - taskExecutionContextCache.put(taskExecutionContext.getTaskInstanceId(), taskExecutionContext); - } - - /** - * remove taskInstance by taskInstanceId - * - * @param taskInstanceId taskInstanceId - */ - @Override - public void removeByTaskInstanceId(Integer taskInstanceId) { - taskExecutionContextCache.remove(taskInstanceId); - } - - @Override - public boolean updateTaskExecutionContext(TaskExecutionContext taskExecutionContext) { - taskExecutionContextCache.computeIfPresent(taskExecutionContext.getTaskInstanceId(), (k, v) -> taskExecutionContext); - return taskExecutionContextCache.containsKey(taskExecutionContext.getTaskInstanceId()); - } -} diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java index 877a69428d..dbf5c1a7e5 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java @@ -28,6 +28,7 @@ import org.apache.dolphinscheduler.common.utils.LoggerUtils; import org.apache.dolphinscheduler.common.utils.NetUtils; import org.apache.dolphinscheduler.common.utils.OSUtils; import org.apache.dolphinscheduler.common.utils.Preconditions; +import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContextCacheManager; import org.apache.dolphinscheduler.remote.command.Command; import org.apache.dolphinscheduler.remote.command.CommandType; import org.apache.dolphinscheduler.remote.command.TaskExecuteAckCommand; @@ -36,14 +37,13 @@ import org.apache.dolphinscheduler.remote.processor.NettyRequestProcessor; import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; import org.apache.dolphinscheduler.server.utils.LogUtils; import org.apache.dolphinscheduler.server.worker.cache.ResponceCache; -import org.apache.dolphinscheduler.server.worker.cache.TaskExecutionContextCacheManager; -import org.apache.dolphinscheduler.server.worker.cache.impl.TaskExecutionContextCacheManagerImpl; import org.apache.dolphinscheduler.server.worker.config.WorkerConfig; import org.apache.dolphinscheduler.server.worker.plugin.TaskPluginManager; import org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread; import org.apache.dolphinscheduler.server.worker.runner.WorkerManagerThread; import org.apache.dolphinscheduler.service.alert.AlertClientService; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; +import org.apache.dolphinscheduler.spi.task.request.TaskRequest; import java.util.Date; import java.util.Optional; @@ -77,11 +77,6 @@ public class TaskExecuteProcessor implements NettyRequestProcessor { private TaskPluginManager taskPluginManager; - /** - * taskExecutionContextCacheManager - */ - private final TaskExecutionContextCacheManager taskExecutionContextCacheManager; - /* * task execute manager */ @@ -90,7 +85,6 @@ public class TaskExecuteProcessor implements NettyRequestProcessor { public TaskExecuteProcessor() { this.taskCallbackService = SpringApplicationContext.getBean(TaskCallbackService.class); this.workerConfig = SpringApplicationContext.getBean(WorkerConfig.class); - this.taskExecutionContextCacheManager = SpringApplicationContext.getBean(TaskExecutionContextCacheManagerImpl.class); this.workerManager = SpringApplicationContext.getBean(WorkerManagerThread.class); } @@ -102,7 +96,8 @@ public class TaskExecuteProcessor implements NettyRequestProcessor { private void setTaskCache(TaskExecutionContext taskExecutionContext) { TaskExecutionContext preTaskCache = new TaskExecutionContext(); preTaskCache.setTaskInstanceId(taskExecutionContext.getTaskInstanceId()); - taskExecutionContextCacheManager.cacheTaskExecutionContext(preTaskCache); + TaskRequest taskRequest = JSONUtils.parseObject(JSONUtils.toJsonString(taskExecutionContext), TaskRequest.class); + TaskExecutionContextCacheManager.cacheTaskExecutionContext(taskRequest); } public TaskExecuteProcessor(AlertClientService alertClientService, TaskPluginManager taskPluginManager) { @@ -153,7 +148,7 @@ public class TaskExecuteProcessor implements NettyRequestProcessor { } catch (Throwable ex) { String errorLog = String.format("create execLocalPath : %s", execLocalPath); LoggerUtils.logError(Optional.of(logger), errorLog, ex); - taskExecutionContextCacheManager.removeByTaskInstanceId(taskExecutionContext.getTaskInstanceId()); + TaskExecutionContextCacheManager.removeByTaskInstanceId(taskExecutionContext.getTaskInstanceId()); } FileUtils.taskLoggerThreadLocal.remove(); diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskKillProcessor.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskKillProcessor.java index b4713a9844..07154b87d5 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskKillProcessor.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskKillProcessor.java @@ -24,6 +24,7 @@ import org.apache.dolphinscheduler.common.utils.LoggerUtils; import org.apache.dolphinscheduler.common.utils.OSUtils; import org.apache.dolphinscheduler.common.utils.Preconditions; import org.apache.dolphinscheduler.common.utils.StringUtils; +import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContextCacheManager; import org.apache.dolphinscheduler.remote.command.Command; import org.apache.dolphinscheduler.remote.command.CommandType; import org.apache.dolphinscheduler.remote.command.TaskKillRequestCommand; @@ -33,12 +34,11 @@ import org.apache.dolphinscheduler.remote.utils.Host; import org.apache.dolphinscheduler.remote.utils.Pair; import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; import org.apache.dolphinscheduler.server.utils.ProcessUtils; -import org.apache.dolphinscheduler.server.worker.cache.TaskExecutionContextCacheManager; -import org.apache.dolphinscheduler.server.worker.cache.impl.TaskExecutionContextCacheManagerImpl; import org.apache.dolphinscheduler.server.worker.config.WorkerConfig; import org.apache.dolphinscheduler.server.worker.runner.WorkerManagerThread; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import org.apache.dolphinscheduler.service.log.LogClientService; +import org.apache.dolphinscheduler.spi.task.request.TaskRequest; import java.util.Collections; import java.util.List; @@ -65,11 +65,6 @@ public class TaskKillProcessor implements NettyRequestProcessor { */ private final TaskCallbackService taskCallbackService; - /** - * taskExecutionContextCacheManager - */ - private TaskExecutionContextCacheManager taskExecutionContextCacheManager; - /* * task execute manager */ @@ -78,7 +73,6 @@ public class TaskKillProcessor implements NettyRequestProcessor { public TaskKillProcessor() { this.taskCallbackService = SpringApplicationContext.getBean(TaskCallbackService.class); this.workerConfig = SpringApplicationContext.getBean(WorkerConfig.class); - this.taskExecutionContextCacheManager = SpringApplicationContext.getBean(TaskExecutionContextCacheManagerImpl.class); this.workerManager = SpringApplicationContext.getBean(WorkerManagerThread.class); } @@ -101,7 +95,7 @@ public class TaskKillProcessor implements NettyRequestProcessor { TaskKillResponseCommand taskKillResponseCommand = buildKillTaskResponseCommand(killCommand, result); taskCallbackService.sendResult(taskKillResponseCommand.getTaskInstanceId(), taskKillResponseCommand.convert2Command()); - taskExecutionContextCacheManager.removeByTaskInstanceId(taskKillResponseCommand.getTaskInstanceId()); + TaskExecutionContextCacheManager.removeByTaskInstanceId(taskKillResponseCommand.getTaskInstanceId()); } /** @@ -113,12 +107,14 @@ public class TaskKillProcessor implements NettyRequestProcessor { boolean processFlag = true; List appIds = Collections.emptyList(); int taskInstanceId = killCommand.getTaskInstanceId(); - TaskExecutionContext taskExecutionContext = taskExecutionContextCacheManager.getByTaskInstanceId(taskInstanceId); + TaskRequest taskRequest = TaskExecutionContextCacheManager.getByTaskInstanceId(taskInstanceId); + TaskExecutionContext taskExecutionContext =JSONUtils.parseObject(JSONUtils.toJsonString(taskRequest), TaskExecutionContext.class); + try { Integer processId = taskExecutionContext.getProcessId(); if (processId.equals(0)) { workerManager.killTaskBeforeExecuteByInstanceId(taskInstanceId); - taskExecutionContextCacheManager.removeByTaskInstanceId(taskInstanceId); + TaskExecutionContextCacheManager.removeByTaskInstanceId(taskInstanceId); logger.info("the task has not been executed and has been cancelled, task id:{}", taskInstanceId); return Pair.of(true, appIds); } @@ -155,7 +151,11 @@ public class TaskKillProcessor implements NettyRequestProcessor { TaskKillResponseCommand taskKillResponseCommand = new TaskKillResponseCommand(); taskKillResponseCommand.setStatus(result.getLeft() ? ExecutionStatus.SUCCESS.getCode() : ExecutionStatus.FAILURE.getCode()); taskKillResponseCommand.setAppIds(result.getRight()); - TaskExecutionContext taskExecutionContext = taskExecutionContextCacheManager.getByTaskInstanceId(killCommand.getTaskInstanceId()); + TaskRequest taskRequest = TaskExecutionContextCacheManager.getByTaskInstanceId(killCommand.getTaskInstanceId()); + if (taskRequest == null) { + return taskKillResponseCommand; + } + TaskExecutionContext taskExecutionContext =JSONUtils.parseObject(JSONUtils.toJsonString(taskRequest), TaskExecutionContext.class); if (taskExecutionContext != null) { taskKillResponseCommand.setTaskInstanceId(taskExecutionContext.getTaskInstanceId()); taskKillResponseCommand.setHost(taskExecutionContext.getHost()); diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java index 56744738df..ca6ef7fd49 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java @@ -28,17 +28,15 @@ import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.common.utils.OSUtils; import org.apache.dolphinscheduler.common.utils.RetryerUtils; import org.apache.dolphinscheduler.common.utils.StringUtils; +import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContextCacheManager; import org.apache.dolphinscheduler.remote.command.Command; import org.apache.dolphinscheduler.remote.command.TaskExecuteAckCommand; import org.apache.dolphinscheduler.remote.command.TaskExecuteResponseCommand; import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; import org.apache.dolphinscheduler.server.worker.cache.ResponceCache; -import org.apache.dolphinscheduler.server.worker.cache.TaskExecutionContextCacheManager; -import org.apache.dolphinscheduler.server.worker.cache.impl.TaskExecutionContextCacheManagerImpl; import org.apache.dolphinscheduler.server.worker.plugin.TaskPluginManager; import org.apache.dolphinscheduler.server.worker.processor.TaskCallbackService; import org.apache.dolphinscheduler.service.alert.AlertClientService; -import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import org.apache.dolphinscheduler.spi.task.AbstractTask; import org.apache.dolphinscheduler.spi.task.TaskChannel; import org.apache.dolphinscheduler.spi.task.request.TaskRequest; @@ -114,7 +112,6 @@ public class TaskExecuteThread implements Runnable, Delayed { AlertClientService alertClientService) { this.taskExecutionContext = taskExecutionContext; this.taskCallbackService = taskCallbackService; - this.taskExecutionContextCacheManager = SpringApplicationContext.getBean(TaskExecutionContextCacheManagerImpl.class); this.alertClientService = alertClientService; } @@ -124,7 +121,6 @@ public class TaskExecuteThread implements Runnable, Delayed { TaskPluginManager taskPluginManager) { this.taskExecutionContext = taskExecutionContext; this.taskCallbackService = taskCallbackService; - this.taskExecutionContextCacheManager = SpringApplicationContext.getBean(TaskExecutionContextCacheManagerImpl.class); this.alertClientService = alertClientService; this.taskPluginManager = taskPluginManager; } @@ -195,7 +191,7 @@ public class TaskExecuteThread implements Runnable, Delayed { responseCommand.setProcessId(task.getProcessId()); responseCommand.setAppIds(task.getAppIds()); } finally { - taskExecutionContextCacheManager.removeByTaskInstanceId(taskExecutionContext.getTaskInstanceId()); + TaskExecutionContextCacheManager.removeByTaskInstanceId(taskExecutionContext.getTaskInstanceId()); ResponceCache.get().cache(taskExecutionContext.getTaskInstanceId(), responseCommand.convert2Command(), Event.RESULT); taskCallbackService.sendResult(taskExecutionContext.getTaskInstanceId(), responseCommand.convert2Command()); clearTaskExecPath(); diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/WorkerManagerThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/WorkerManagerThread.java index 5467b446d6..839b461318 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/WorkerManagerThread.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/WorkerManagerThread.java @@ -21,14 +21,15 @@ import org.apache.dolphinscheduler.common.enums.Event; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.thread.Stopper; import org.apache.dolphinscheduler.common.thread.ThreadUtils; +import org.apache.dolphinscheduler.common.utils.JSONUtils; +import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContextCacheManager; import org.apache.dolphinscheduler.remote.command.TaskExecuteResponseCommand; import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; import org.apache.dolphinscheduler.server.worker.cache.ResponceCache; -import org.apache.dolphinscheduler.server.worker.cache.TaskExecutionContextCacheManager; -import org.apache.dolphinscheduler.server.worker.cache.impl.TaskExecutionContextCacheManagerImpl; import org.apache.dolphinscheduler.server.worker.config.WorkerConfig; import org.apache.dolphinscheduler.server.worker.processor.TaskCallbackService; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; +import org.apache.dolphinscheduler.spi.task.request.TaskRequest; import java.util.concurrent.DelayQueue; import java.util.concurrent.ExecutorService; @@ -60,11 +61,6 @@ public class WorkerManagerThread implements Runnable { */ private final ExecutorService workerExecService; - /** - * taskExecutionContextCacheManager - */ - private TaskExecutionContextCacheManager taskExecutionContextCacheManager; - /** * task callback service */ @@ -72,7 +68,6 @@ public class WorkerManagerThread implements Runnable { public WorkerManagerThread() { this.workerConfig = SpringApplicationContext.getBean(WorkerConfig.class); - this.taskExecutionContextCacheManager = SpringApplicationContext.getBean(TaskExecutionContextCacheManagerImpl.class); this.workerExecService = ThreadUtils.newDaemonFixedThreadExecutor("Worker-Execute-Thread", this.workerConfig.getWorkerExecThreads()); this.taskCallbackService = SpringApplicationContext.getBean(TaskCallbackService.class); } @@ -101,10 +96,11 @@ public class WorkerManagerThread implements Runnable { * kill task before execute , like delay task */ private void sendTaskKillResponse(Integer taskInstanceId) { - TaskExecutionContext taskExecutionContext = taskExecutionContextCacheManager.getByTaskInstanceId(taskInstanceId); - if (taskExecutionContext == null) { + TaskRequest taskRequest = TaskExecutionContextCacheManager.getByTaskInstanceId(taskInstanceId); + if (taskRequest == null) { return; } + TaskExecutionContext taskExecutionContext =JSONUtils.parseObject(JSONUtils.toJsonString(taskRequest), TaskExecutionContext.class); TaskExecuteResponseCommand responseCommand = new TaskExecuteResponseCommand(taskExecutionContext.getTaskInstanceId()); responseCommand.setStatus(ExecutionStatus.KILL.getCode()); ResponceCache.get().cache(taskExecutionContext.getTaskInstanceId(), responseCommand.convert2Command(), Event.RESULT); diff --git a/dolphinscheduler-spi/pom.xml b/dolphinscheduler-spi/pom.xml index b96161e1b9..b364cb77ad 100644 --- a/dolphinscheduler-spi/pom.xml +++ b/dolphinscheduler-spi/pom.xml @@ -98,226 +98,6 @@ resolver provided - - - org.apache.hive - hive-jdbc - provided - - - slf4j-log4j12 - org.slf4j - - - org.eclipse.jetty.aggregate - jetty-all - - - - org.apache.ant - ant - - - io.dropwizard.metrics - metrics-json - - - io.dropwizard.metrics - metrics-jvm - - - com.github.joshelser - dropwizard-metrics-hadoop-metrics2-reporter - - - - io.netty - netty-all - - - com.google.code.gson - gson - - - com.google.code.findbugs - jsr305 - - - io.dropwizard.metrics - metrics-core - - - javax.servlet - servlet-api - - - org.apache.avro - avro - - - org.apache.commons - commons-compress - - - org.apache.curator - curator-client - - - org.apache.hadoop - hadoop-auth - - - org.apache.hadoop - hadoop-mapreduce-client-core - - - org.apache.hadoop - hadoop-yarn-api - - - - org.apache.zookeeper - zookeeper - - - org.codehaus.jackson - jackson-jaxrs - - - org.codehaus.jackson - jackson-xc - - - com.google.protobuf - protobuf-java - - - - org.json - json - - - log4j-slf4j-impl - org.apache.logging.log4j - - - javax.servlet - org.eclipse.jetty.orbit - - - servlet-api-2.5 - org.mortbay.jetty - - - jasper-runtime - tomcat - - - slider-core - org.apache.slider - - - hbase-server - org.apache.hbase - - - jersey-client - com.sun.jersey - - - jersey-core - com.sun.jersey - - - jersey-json - com.sun.jersey - - - jersey-server - com.sun.jersey - - - jersey-guice - com.sun.jersey.contribs - - - hbase-common - org.apache.hbase - - - hbase-hadoop2-compat - org.apache.hbase - - - hbase-client - org.apache.hbase - - - hbase-hadoop-compat - org.apache.hbase - - - tephra-hbase-compat-1.0 - co.cask.tephra - - - jaxb-api - javax.xml.bind - - - hive-llap-client - org.apache.hive - - - hive-llap-common - org.apache.hive - - - hive-llap-server - org.apache.hive - - - tephra-core - co.cask.tephra - - - ant - ant - - - stringtemplate - org.antlr - - - antlr-runtime - org.antlr - - - hive-shims - org.apache.hive - - - jsp-api - javax.servlet - - - log4j-api - org.apache.logging.log4j - - - log4j-core - org.apache.logging.log4j - - - log4j-web - org.apache.logging.log4j - - - jasper-compiler - tomcat - - - \ No newline at end of file diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/pom.xml b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/pom.xml index 7e864fa62a..5868976144 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/pom.xml +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/pom.xml @@ -51,6 +51,226 @@ slf4j-api provided + + + org.apache.hive + hive-jdbc + provided + + + slf4j-log4j12 + org.slf4j + + + org.eclipse.jetty.aggregate + jetty-all + + + + org.apache.ant + ant + + + io.dropwizard.metrics + metrics-json + + + io.dropwizard.metrics + metrics-jvm + + + com.github.joshelser + dropwizard-metrics-hadoop-metrics2-reporter + + + + io.netty + netty-all + + + com.google.code.gson + gson + + + com.google.code.findbugs + jsr305 + + + io.dropwizard.metrics + metrics-core + + + javax.servlet + servlet-api + + + org.apache.avro + avro + + + org.apache.commons + commons-compress + + + org.apache.curator + curator-client + + + org.apache.hadoop + hadoop-auth + + + org.apache.hadoop + hadoop-mapreduce-client-core + + + org.apache.hadoop + hadoop-yarn-api + + + + org.apache.zookeeper + zookeeper + + + org.codehaus.jackson + jackson-jaxrs + + + org.codehaus.jackson + jackson-xc + + + com.google.protobuf + protobuf-java + + + + org.json + json + + + log4j-slf4j-impl + org.apache.logging.log4j + + + javax.servlet + org.eclipse.jetty.orbit + + + servlet-api-2.5 + org.mortbay.jetty + + + jasper-runtime + tomcat + + + slider-core + org.apache.slider + + + hbase-server + org.apache.hbase + + + jersey-client + com.sun.jersey + + + jersey-core + com.sun.jersey + + + jersey-json + com.sun.jersey + + + jersey-server + com.sun.jersey + + + jersey-guice + com.sun.jersey.contribs + + + hbase-common + org.apache.hbase + + + hbase-hadoop2-compat + org.apache.hbase + + + hbase-client + org.apache.hbase + + + hbase-hadoop-compat + org.apache.hbase + + + tephra-hbase-compat-1.0 + co.cask.tephra + + + jaxb-api + javax.xml.bind + + + hive-llap-client + org.apache.hive + + + hive-llap-common + org.apache.hive + + + hive-llap-server + org.apache.hive + + + tephra-core + co.cask.tephra + + + ant + ant + + + stringtemplate + org.antlr + + + antlr-runtime + org.antlr + + + hive-shims + org.apache.hive + + + jsp-api + javax.servlet + + + log4j-api + org.apache.logging.log4j + + + log4j-core + org.apache.logging.log4j + + + log4j-web + org.apache.logging.log4j + + + jasper-compiler + tomcat + + + dolphinscheduler-task-api-${project.version} diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/AbstractDatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/AbstractDatasourceProcessor.java similarity index 96% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/AbstractDatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/AbstractDatasourceProcessor.java index 2e5fa2efd3..19d88e1588 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/AbstractDatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/AbstractDatasourceProcessor.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; +package org.apache.dolphinscheduler.plugin.task.datasource; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.util.Map; import java.util.regex.Pattern; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseConnectionParam.java similarity index 73% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseConnectionParam.java index 087c2000c8..44a5962f92 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseConnectionParam.java @@ -15,17 +15,17 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; - -import org.apache.dolphinscheduler.spi.task.datasource.clickhouse.ClickhouseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.db2.Db2ConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.hive.HiveConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.mysql.MysqlConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.oracle.OracleConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.postgresql.PostgreSqlConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.presto.PrestoConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.spark.SparkConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.sqlserver.SqlServerConnectionParam; +package org.apache.dolphinscheduler.plugin.task.datasource; + +import org.apache.dolphinscheduler.plugin.task.datasource.clickhouse.ClickhouseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.db2.Db2ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.hive.HiveConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.mysql.MysqlConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.oracle.OracleConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.postgresql.PostgreSqlConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.presto.PrestoConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.spark.SparkConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.sqlserver.SqlServerConnectionParam; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseDataSourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseDataSourceParamDTO.java similarity index 81% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseDataSourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseDataSourceParamDTO.java index c9ced44ecd..ac46dc28f7 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseDataSourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseDataSourceParamDTO.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; +package org.apache.dolphinscheduler.plugin.task.datasource; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.clickhouse.ClickHouseDatasourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.db2.Db2DatasourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.hive.HiveDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.mysql.MysqlDatasourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.oracle.OracleDatasourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.postgresql.PostgreSqlDatasourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.presto.PrestoDatasourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.spark.SparkDatasourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.sqlserver.SqlServerDatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.clickhouse.ClickHouseDatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.db2.Db2DatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.hive.HiveDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.mysql.MysqlDatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.oracle.OracleDatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.postgresql.PostgreSqlDatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.presto.PrestoDatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.spark.SparkDatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.sqlserver.SqlServerDatasourceParamDTO; import java.io.Serializable; import java.util.Map; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseHdfsConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseHdfsConnectionParam.java similarity index 96% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseHdfsConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseHdfsConnectionParam.java index e3f8eb9a74..ab24027487 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseHdfsConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseHdfsConnectionParam.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; +package org.apache.dolphinscheduler.plugin.task.datasource; public class BaseHdfsConnectionParam extends BaseConnectionParam { protected String principal; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseHdfsDatasourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseHdfsDatasourceParamDTO.java similarity index 96% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseHdfsDatasourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseHdfsDatasourceParamDTO.java index 5e03ceb394..0cfa3cb434 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/BaseHdfsDatasourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/BaseHdfsDatasourceParamDTO.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; +package org.apache.dolphinscheduler.plugin.task.datasource; public abstract class BaseHdfsDatasourceParamDTO extends BaseDataSourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/ConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/ConnectionParam.java similarity index 94% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/ConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/ConnectionParam.java index 403ebe2841..46bd979a2d 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/ConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/ConnectionParam.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; +package org.apache.dolphinscheduler.plugin.task.datasource; import java.io.Serializable; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/DatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/DatasourceProcessor.java similarity index 97% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/DatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/DatasourceProcessor.java index fe888185d6..b0243a4f72 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/DatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/DatasourceProcessor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; +package org.apache.dolphinscheduler.plugin.task.datasource; import org.apache.dolphinscheduler.spi.enums.DbType; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/DatasourceUtil.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/DatasourceUtil.java similarity index 83% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/DatasourceUtil.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/DatasourceUtil.java index c5c4754916..b959a3bad3 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/DatasourceUtil.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/DatasourceUtil.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; +package org.apache.dolphinscheduler.plugin.task.datasource; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.clickhouse.ClickHouseDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.db2.Db2DatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.hive.HiveDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.mysql.MysqlDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.oracle.OracleDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.postgresql.PostgreSqlDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.presto.PrestoDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.spark.SparkDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.sqlserver.SqlServerDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.clickhouse.ClickHouseDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.db2.Db2DatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.hive.HiveDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.mysql.MysqlDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.oracle.OracleDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.postgresql.PostgreSqlDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.presto.PrestoDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.spark.SparkDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.sqlserver.SqlServerDatasourceProcessor; import java.sql.Connection; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/HiveConfUtils.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/HiveConfUtils.java similarity index 97% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/HiveConfUtils.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/HiveConfUtils.java index 96485b27cb..0985b7457c 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/HiveConfUtils.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/HiveConfUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; +package org.apache.dolphinscheduler.plugin.task.datasource; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/PasswordUtils.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/PasswordUtils.java similarity index 98% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/PasswordUtils.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/PasswordUtils.java index a20cd332bd..d71b7d04ee 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/PasswordUtils.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/PasswordUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource; +package org.apache.dolphinscheduler.plugin.task.datasource; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DATASOURCE_ENCRYPTION_ENABLE; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DATASOURCE_ENCRYPTION_SALT; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/clickhouse/ClickHouseDatasourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/clickhouse/ClickHouseDatasourceParamDTO.java similarity index 90% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/clickhouse/ClickHouseDatasourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/clickhouse/ClickHouseDatasourceParamDTO.java index 750552b196..8630d92d43 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/clickhouse/ClickHouseDatasourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/clickhouse/ClickHouseDatasourceParamDTO.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.clickhouse; +package org.apache.dolphinscheduler.plugin.task.datasource.clickhouse; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; public class ClickHouseDatasourceParamDTO extends BaseDataSourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/clickhouse/ClickHouseDatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/clickhouse/ClickHouseDatasourceProcessor.java similarity index 91% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/clickhouse/ClickHouseDatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/clickhouse/ClickHouseDatasourceProcessor.java index fcc3bc7f56..337f4e052d 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/clickhouse/ClickHouseDatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/clickhouse/ClickHouseDatasourceProcessor.java @@ -15,24 +15,24 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.clickhouse; +package org.apache.dolphinscheduler.plugin.task.datasource.clickhouse; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COLON; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COMMA; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COM_CLICKHOUSE_JDBC_DRIVER; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_SLASH; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_CLICKHOUSE; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.encodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.encodePassword; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.AbstractDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.AbstractDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.sql.Connection; import java.sql.DriverManager; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/clickhouse/ClickhouseConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/clickhouse/ClickhouseConnectionParam.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/clickhouse/ClickhouseConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/clickhouse/ClickhouseConnectionParam.java index 38f51f4efb..c01d0005a9 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/clickhouse/ClickhouseConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/clickhouse/ClickhouseConnectionParam.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.clickhouse; +package org.apache.dolphinscheduler.plugin.task.datasource.clickhouse; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; public class ClickhouseConnectionParam extends BaseConnectionParam { @Override diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/db2/Db2ConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/db2/Db2ConnectionParam.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/db2/Db2ConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/db2/Db2ConnectionParam.java index 1460ed7326..ba66c5e16e 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/db2/Db2ConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/db2/Db2ConnectionParam.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.db2; +package org.apache.dolphinscheduler.plugin.task.datasource.db2; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; public class Db2ConnectionParam extends BaseConnectionParam { @Override diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/db2/Db2DatasourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/db2/Db2DatasourceParamDTO.java similarity index 91% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/db2/Db2DatasourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/db2/Db2DatasourceParamDTO.java index d186e75820..dba7bb0d10 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/db2/Db2DatasourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/db2/Db2DatasourceParamDTO.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.db2; +package org.apache.dolphinscheduler.plugin.task.datasource.db2; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; public class Db2DatasourceParamDTO extends BaseDataSourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/db2/Db2DatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/db2/Db2DatasourceProcessor.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/db2/Db2DatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/db2/Db2DatasourceProcessor.java index 2452870f26..18ba719ac6 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/db2/Db2DatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/db2/Db2DatasourceProcessor.java @@ -15,25 +15,25 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.db2; +package org.apache.dolphinscheduler.plugin.task.datasource.db2; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COLON; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COMMA; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COM_DB2_JDBC_DRIVER; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_SLASH; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_DB2; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.encodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.encodePassword; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.AbstractDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.AbstractDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.sql.Connection; import java.sql.DriverManager; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/hive/HiveConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/hive/HiveConnectionParam.java similarity index 91% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/hive/HiveConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/hive/HiveConnectionParam.java index e77d362822..006f12917b 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/hive/HiveConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/hive/HiveConnectionParam.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.hive; +package org.apache.dolphinscheduler.plugin.task.datasource.hive; -import org.apache.dolphinscheduler.spi.task.datasource.BaseHdfsConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseHdfsConnectionParam; public class HiveConnectionParam extends BaseHdfsConnectionParam { @Override diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/hive/HiveDataSourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/hive/HiveDataSourceParamDTO.java similarity index 91% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/hive/HiveDataSourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/hive/HiveDataSourceParamDTO.java index db967888b7..a61e96645f 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/hive/HiveDataSourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/hive/HiveDataSourceParamDTO.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.hive; +package org.apache.dolphinscheduler.plugin.task.datasource.hive; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseHdfsDatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseHdfsDatasourceParamDTO; public class HiveDataSourceParamDTO extends BaseHdfsDatasourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/hive/HiveDatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/hive/HiveDatasourceProcessor.java similarity index 91% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/hive/HiveDatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/hive/HiveDatasourceProcessor.java index e4360e496d..2a95d1b098 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/hive/HiveDatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/hive/HiveDatasourceProcessor.java @@ -15,27 +15,27 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.hive; +package org.apache.dolphinscheduler.plugin.task.datasource.hive; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COLON; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COMMA; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_SLASH; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_HIVE_2; import static org.apache.dolphinscheduler.spi.task.TaskConstants.ORG_APACHE_HIVE_JDBC_HIVE_DRIVER; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.encodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.encodePassword; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.AbstractDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.HiveConfUtils; -import org.apache.dolphinscheduler.spi.utils.CommonUtils; +import org.apache.dolphinscheduler.plugin.task.datasource.AbstractDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.HiveConfUtils; +import org.apache.dolphinscheduler.plugin.task.util.CommonUtils; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.io.IOException; import java.sql.Connection; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/mysql/MysqlConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/mysql/MysqlConnectionParam.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/mysql/MysqlConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/mysql/MysqlConnectionParam.java index 8f3e65bc9f..ea7a574db5 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/mysql/MysqlConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/mysql/MysqlConnectionParam.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.mysql; +package org.apache.dolphinscheduler.plugin.task.datasource.mysql; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; public class MysqlConnectionParam extends BaseConnectionParam { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/mysql/MysqlDatasourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/mysql/MysqlDatasourceParamDTO.java similarity index 90% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/mysql/MysqlDatasourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/mysql/MysqlDatasourceParamDTO.java index 48d7aa98d5..5f1389a57b 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/mysql/MysqlDatasourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/mysql/MysqlDatasourceParamDTO.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.mysql; +package org.apache.dolphinscheduler.plugin.task.datasource.mysql; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; public class MysqlDatasourceParamDTO extends BaseDataSourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/mysql/MysqlDatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/mysql/MysqlDatasourceProcessor.java similarity index 92% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/mysql/MysqlDatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/mysql/MysqlDatasourceProcessor.java index 0ba9671451..86c154965a 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/mysql/MysqlDatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/mysql/MysqlDatasourceProcessor.java @@ -15,25 +15,25 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.mysql; +package org.apache.dolphinscheduler.plugin.task.datasource.mysql; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COLON; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COMMA; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COM_MYSQL_JDBC_DRIVER; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_SLASH; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_MYSQL; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.encodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.encodePassword; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.AbstractDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.AbstractDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.sql.Connection; import java.sql.DriverManager; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/oracle/OracleConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/oracle/OracleConnectionParam.java similarity index 91% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/oracle/OracleConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/oracle/OracleConnectionParam.java index 03bf74ddf0..06e4e17774 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/oracle/OracleConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/oracle/OracleConnectionParam.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.oracle; +package org.apache.dolphinscheduler.plugin.task.datasource.oracle; import org.apache.dolphinscheduler.spi.enums.DbConnectType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; public class OracleConnectionParam extends BaseConnectionParam { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/oracle/OracleDatasourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/oracle/OracleDatasourceParamDTO.java similarity index 92% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/oracle/OracleDatasourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/oracle/OracleDatasourceParamDTO.java index 07cb8da7d7..99530d9751 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/oracle/OracleDatasourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/oracle/OracleDatasourceParamDTO.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.oracle; +package org.apache.dolphinscheduler.plugin.task.datasource.oracle; import org.apache.dolphinscheduler.spi.enums.DbConnectType; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; public class OracleDatasourceParamDTO extends BaseDataSourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/oracle/OracleDatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/oracle/OracleDatasourceProcessor.java similarity index 90% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/oracle/OracleDatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/oracle/OracleDatasourceProcessor.java index 7c456a8f16..5e3497e09d 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/oracle/OracleDatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/oracle/OracleDatasourceProcessor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.oracle; +package org.apache.dolphinscheduler.plugin.task.datasource.oracle; import static org.apache.dolphinscheduler.spi.task.TaskConstants.AT_SIGN; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COLON; @@ -24,19 +24,19 @@ import static org.apache.dolphinscheduler.spi.task.TaskConstants.COM_ORACLE_JDBC import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_SLASH; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_ORACLE_SERVICE_NAME; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_ORACLE_SID; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.encodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.encodePassword; import org.apache.dolphinscheduler.spi.enums.DbConnectType; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.AbstractDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.AbstractDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.sql.Connection; import java.sql.DriverManager; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/postgresql/PostgreSqlConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/postgresql/PostgreSqlConnectionParam.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/postgresql/PostgreSqlConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/postgresql/PostgreSqlConnectionParam.java index c63096d333..1d459ca2b0 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/postgresql/PostgreSqlConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/postgresql/PostgreSqlConnectionParam.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.postgresql; +package org.apache.dolphinscheduler.plugin.task.datasource.postgresql; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; public class PostgreSqlConnectionParam extends BaseConnectionParam { @Override diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/postgresql/PostgreSqlDatasourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/postgresql/PostgreSqlDatasourceParamDTO.java similarity index 90% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/postgresql/PostgreSqlDatasourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/postgresql/PostgreSqlDatasourceParamDTO.java index 14c4aaa636..b6299c5e24 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/postgresql/PostgreSqlDatasourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/postgresql/PostgreSqlDatasourceParamDTO.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.postgresql; +package org.apache.dolphinscheduler.plugin.task.datasource.postgresql; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; public class PostgreSqlDatasourceParamDTO extends BaseDataSourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/postgresql/PostgreSqlDatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/postgresql/PostgreSqlDatasourceProcessor.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/postgresql/PostgreSqlDatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/postgresql/PostgreSqlDatasourceProcessor.java index 337809eaaa..9f7b1ed268 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/postgresql/PostgreSqlDatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/postgresql/PostgreSqlDatasourceProcessor.java @@ -15,25 +15,25 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.postgresql; +package org.apache.dolphinscheduler.plugin.task.datasource.postgresql; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COLON; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COMMA; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_SLASH; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_POSTGRESQL; import static org.apache.dolphinscheduler.spi.task.TaskConstants.ORG_POSTGRESQL_DRIVER; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.encodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.encodePassword; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.AbstractDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.AbstractDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.sql.Connection; import java.sql.DriverManager; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/presto/PrestoConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/presto/PrestoConnectionParam.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/presto/PrestoConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/presto/PrestoConnectionParam.java index ac142b6ff0..b6a226d982 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/presto/PrestoConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/presto/PrestoConnectionParam.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.presto; +package org.apache.dolphinscheduler.plugin.task.datasource.presto; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; public class PrestoConnectionParam extends BaseConnectionParam { @Override diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/presto/PrestoDatasourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/presto/PrestoDatasourceParamDTO.java similarity index 90% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/presto/PrestoDatasourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/presto/PrestoDatasourceParamDTO.java index 689d6738f8..b43326af2b 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/presto/PrestoDatasourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/presto/PrestoDatasourceParamDTO.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.presto; +package org.apache.dolphinscheduler.plugin.task.datasource.presto; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; public class PrestoDatasourceParamDTO extends BaseDataSourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/presto/PrestoDatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/presto/PrestoDatasourceProcessor.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/presto/PrestoDatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/presto/PrestoDatasourceProcessor.java index 55eef138c9..1e45f7c045 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/presto/PrestoDatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/presto/PrestoDatasourceProcessor.java @@ -15,25 +15,25 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.presto; +package org.apache.dolphinscheduler.plugin.task.datasource.presto; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COLON; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COMMA; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COM_PRESTO_JDBC_DRIVER; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_SLASH; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_PRESTO; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.encodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.encodePassword; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.AbstractDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.AbstractDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.sql.Connection; import java.sql.DriverManager; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/spark/SparkConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/spark/SparkConnectionParam.java similarity index 91% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/spark/SparkConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/spark/SparkConnectionParam.java index ff226a20e4..fad385e3ce 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/spark/SparkConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/spark/SparkConnectionParam.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.spark; +package org.apache.dolphinscheduler.plugin.task.datasource.spark; -import org.apache.dolphinscheduler.spi.task.datasource.BaseHdfsConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseHdfsConnectionParam; public class SparkConnectionParam extends BaseHdfsConnectionParam { @Override diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/spark/SparkDatasourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/spark/SparkDatasourceParamDTO.java similarity index 91% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/spark/SparkDatasourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/spark/SparkDatasourceParamDTO.java index afe204751d..b12844e595 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/spark/SparkDatasourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/spark/SparkDatasourceParamDTO.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.spark; +package org.apache.dolphinscheduler.plugin.task.datasource.spark; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseHdfsDatasourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseHdfsDatasourceParamDTO; public class SparkDatasourceParamDTO extends BaseHdfsDatasourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/spark/SparkDatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/spark/SparkDatasourceProcessor.java similarity index 91% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/spark/SparkDatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/spark/SparkDatasourceProcessor.java index 53b4fd9770..77351205a4 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/spark/SparkDatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/spark/SparkDatasourceProcessor.java @@ -15,26 +15,26 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.spark; +package org.apache.dolphinscheduler.plugin.task.datasource.spark; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COLON; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COMMA; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_SLASH; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_HIVE_2; import static org.apache.dolphinscheduler.spi.task.TaskConstants.ORG_APACHE_HIVE_JDBC_HIVE_DRIVER; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.encodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.encodePassword; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.AbstractDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; -import org.apache.dolphinscheduler.spi.utils.CommonUtils; +import org.apache.dolphinscheduler.plugin.task.datasource.AbstractDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.util.CommonUtils; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.io.IOException; import java.sql.Connection; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/sqlserver/SqlServerConnectionParam.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/sqlserver/SqlServerConnectionParam.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/sqlserver/SqlServerConnectionParam.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/sqlserver/SqlServerConnectionParam.java index 8091cd86b3..5ef72fdeaa 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/sqlserver/SqlServerConnectionParam.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/sqlserver/SqlServerConnectionParam.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.sqlserver; +package org.apache.dolphinscheduler.plugin.task.datasource.sqlserver; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; public class SqlServerConnectionParam extends BaseConnectionParam { @Override diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/sqlserver/SqlServerDatasourceParamDTO.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/sqlserver/SqlServerDatasourceParamDTO.java similarity index 90% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/sqlserver/SqlServerDatasourceParamDTO.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/sqlserver/SqlServerDatasourceParamDTO.java index c6024c8a8d..9af1449efc 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/sqlserver/SqlServerDatasourceParamDTO.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/sqlserver/SqlServerDatasourceParamDTO.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.sqlserver; +package org.apache.dolphinscheduler.plugin.task.datasource.sqlserver; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; public class SqlServerDatasourceParamDTO extends BaseDataSourceParamDTO { diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/sqlserver/SqlServerDatasourceProcessor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/sqlserver/SqlServerDatasourceProcessor.java similarity index 89% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/sqlserver/SqlServerDatasourceProcessor.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/sqlserver/SqlServerDatasourceProcessor.java index 6b76a6b0a2..4393ca42fe 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/datasource/sqlserver/SqlServerDatasourceProcessor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/datasource/sqlserver/SqlServerDatasourceProcessor.java @@ -15,25 +15,25 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.task.datasource.sqlserver; +package org.apache.dolphinscheduler.plugin.task.datasource.sqlserver; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COLON; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COMMA; import static org.apache.dolphinscheduler.spi.task.TaskConstants.COM_SQLSERVER_JDBC_DRIVER; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_SLASH; import static org.apache.dolphinscheduler.spi.task.TaskConstants.JDBC_SQLSERVER; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.encodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.encodePassword; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.AbstractDatasourceProcessor; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.BaseDataSourceParamDTO; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.AbstractDatasourceProcessor; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseDataSourceParamDTO; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections.MapUtils; import java.sql.Connection; import java.sql.DriverManager; diff --git a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/utils/CommonUtils.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/util/CommonUtils.java similarity index 96% rename from dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/utils/CommonUtils.java rename to dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/util/CommonUtils.java index 9017655d1c..0ce90adc27 100644 --- a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/utils/CommonUtils.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/util/CommonUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.dolphinscheduler.spi.utils; +package org.apache.dolphinscheduler.plugin.task.util; import static org.apache.dolphinscheduler.spi.task.TaskConstants.HADOOP_SECURITY_AUTHENTICATION; import static org.apache.dolphinscheduler.spi.task.TaskConstants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE; @@ -27,6 +27,8 @@ import static org.apache.dolphinscheduler.spi.task.TaskConstants.LOGIN_USER_KEY_ import static org.apache.dolphinscheduler.spi.task.TaskConstants.RESOURCE_STORAGE_TYPE; import org.apache.dolphinscheduler.spi.enums.ResUploadType; +import org.apache.dolphinscheduler.spi.utils.PropertyUtils; +import org.apache.dolphinscheduler.spi.utils.StringUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.security.UserGroupInformation; diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java index b48d5e8fff..60b90ec50d 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java @@ -19,7 +19,7 @@ package org.apache.dolphinscheduler.plugin.task.datax; import static org.apache.dolphinscheduler.spi.task.TaskConstants.EXIT_CODE_FAILURE; import static org.apache.dolphinscheduler.spi.task.TaskConstants.RWXR_XR_X; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; import org.apache.dolphinscheduler.plugin.task.api.AbstractTaskExecutor; import org.apache.dolphinscheduler.plugin.task.api.ShellCommandExecutor; @@ -29,8 +29,8 @@ import org.apache.dolphinscheduler.spi.enums.DbType; import org.apache.dolphinscheduler.spi.enums.Flag; import org.apache.dolphinscheduler.spi.task.AbstractParameters; import org.apache.dolphinscheduler.spi.task.Property; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.DatasourceUtil; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.DatasourceUtil; import org.apache.dolphinscheduler.spi.task.paramparser.ParamUtils; import org.apache.dolphinscheduler.spi.task.paramparser.ParameterUtils; import org.apache.dolphinscheduler.spi.task.request.DataxTaskRequest; diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-procedure/src/main/java/org/apache/dolphinscheduler/plugin/task/procedure/ProcedureTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-procedure/src/main/java/org/apache/dolphinscheduler/plugin/task/procedure/ProcedureTask.java index ef84036f86..96e700a827 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-procedure/src/main/java/org/apache/dolphinscheduler/plugin/task/procedure/ProcedureTask.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-procedure/src/main/java/org/apache/dolphinscheduler/plugin/task/procedure/ProcedureTask.java @@ -28,8 +28,8 @@ import org.apache.dolphinscheduler.spi.enums.TaskTimeoutStrategy; import org.apache.dolphinscheduler.spi.task.AbstractParameters; import org.apache.dolphinscheduler.spi.task.Direct; import org.apache.dolphinscheduler.spi.task.Property; -import org.apache.dolphinscheduler.spi.task.datasource.ConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.DatasourceUtil; +import org.apache.dolphinscheduler.plugin.task.datasource.ConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.DatasourceUtil; import org.apache.dolphinscheduler.spi.task.paramparser.ParamUtils; import org.apache.dolphinscheduler.spi.task.paramparser.ParameterUtils; import org.apache.dolphinscheduler.spi.task.request.ProcedureTaskRequest; diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-spark/src/main/java/org/apache/dolphinscheduler/plugin/task/spark/SparkTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-spark/src/main/java/org/apache/dolphinscheduler/plugin/task/spark/SparkTask.java index 887a12fa9c..4cb3f67b45 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-spark/src/main/java/org/apache/dolphinscheduler/plugin/task/spark/SparkTask.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-spark/src/main/java/org/apache/dolphinscheduler/plugin/task/spark/SparkTask.java @@ -127,7 +127,7 @@ public class SparkTask extends AbstractYarnTask { if (resourceId == 0) { resourceName = mainJar.getRes(); } else { - //when update resource maybe has error ,也许也可以交给上层去做控制 需要看资源是否可以抽象为共性 目前来讲我认为是可以的 + //when update resource maybe has error resourceName = mainJar.getResourceName().replaceFirst("/", ""); } mainJar.setRes(resourceName); diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/generator/sources/MysqlSourceGenerator.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/generator/sources/MysqlSourceGenerator.java index 5c7fb05c03..ddc2765c0c 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/generator/sources/MysqlSourceGenerator.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/generator/sources/MysqlSourceGenerator.java @@ -32,7 +32,7 @@ import static org.apache.dolphinscheduler.spi.task.TaskConstants.COMMA; import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_QUOTES; import static org.apache.dolphinscheduler.spi.task.TaskConstants.EQUAL_SIGN; import static org.apache.dolphinscheduler.spi.task.TaskConstants.SPACE; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; import org.apache.dolphinscheduler.plugin.task.sqoop.SqoopQueryType; import org.apache.dolphinscheduler.plugin.task.sqoop.generator.ISourceGenerator; @@ -40,8 +40,8 @@ import org.apache.dolphinscheduler.plugin.task.sqoop.parameter.SqoopParameters; import org.apache.dolphinscheduler.plugin.task.sqoop.parameter.sources.SourceMysqlParameter; import org.apache.dolphinscheduler.spi.enums.DbType; import org.apache.dolphinscheduler.spi.task.Property; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.DatasourceUtil; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.DatasourceUtil; import org.apache.dolphinscheduler.spi.task.request.SqoopTaskRequest; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/generator/targets/MysqlTargetGenerator.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/generator/targets/MysqlTargetGenerator.java index a79360fbc7..f5e1c94c68 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/generator/targets/MysqlTargetGenerator.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/generator/targets/MysqlTargetGenerator.java @@ -29,14 +29,14 @@ import static org.apache.dolphinscheduler.plugin.task.sqoop.SqoopConstants.UPDAT import static org.apache.dolphinscheduler.spi.task.TaskConstants.DOUBLE_QUOTES; import static org.apache.dolphinscheduler.spi.task.TaskConstants.SINGLE_QUOTES; import static org.apache.dolphinscheduler.spi.task.TaskConstants.SPACE; -import static org.apache.dolphinscheduler.spi.task.datasource.PasswordUtils.decodePassword; +import static org.apache.dolphinscheduler.plugin.task.datasource.PasswordUtils.decodePassword; import org.apache.dolphinscheduler.plugin.task.sqoop.generator.ITargetGenerator; import org.apache.dolphinscheduler.plugin.task.sqoop.parameter.SqoopParameters; import org.apache.dolphinscheduler.plugin.task.sqoop.parameter.targets.TargetMysqlParameter; import org.apache.dolphinscheduler.spi.enums.DbType; -import org.apache.dolphinscheduler.spi.task.datasource.BaseConnectionParam; -import org.apache.dolphinscheduler.spi.task.datasource.DatasourceUtil; +import org.apache.dolphinscheduler.plugin.task.datasource.BaseConnectionParam; +import org.apache.dolphinscheduler.plugin.task.datasource.DatasourceUtil; import org.apache.dolphinscheduler.spi.task.request.SqoopTaskRequest; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils;