This is an automated email from the ASF dual-hosted git repository.
zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new d67e301822 [Improvement-18056] Remove unused code in task plugin
module (#18115)
d67e301822 is described below
commit d67e301822a324e2263f91c62e17e712f7cc1cb9
Author: xiangzihao <[email protected]>
AuthorDate: Wed Apr 1 17:08:31 2026 +0800
[Improvement-18056] Remove unused code in task plugin module (#18115)
---
.../plugin/task/api/loop/BaseLoopTaskExecutor.java | 127 ---------------------
.../api/loop/LoopTaskCancelMethodDefinition.java | 26 -----
.../plugin/task/api/loop/LoopTaskDefinition.java | 48 --------
.../plugin/task/api/loop/LoopTaskInstanceInfo.java | 30 -----
.../task/api/loop/LoopTaskInstanceStatus.java | 38 ------
.../task/api/loop/LoopTaskMethodDefinition.java | 27 -----
.../plugin/task/api/loop/LoopTaskMethodType.java | 23 ----
.../loop/LoopTaskQueryStatusMethodDefinition.java | 34 ------
.../loop/LoopTaskSubmitTaskMethodDefinition.java | 26 -----
.../api/loop/template/LoopTaskYamlDefinition.java | 87 --------------
.../api/loop/template/TaskDefinitionParser.java | 32 ------
.../task/api/model/DynamicInputParameter.java | 37 ------
.../plugin/task/api/model/JdbcInfo.java | 49 --------
.../task/api/parameters/DynamicParameters.java | 58 ----------
.../task/chunjun/ChunJunTaskExecutionContext.java | 62 ----------
.../exception/JavaSourceFileExistException.java | 41 -------
.../exception/PublicClassNotFoundException.java | 41 -------
17 files changed, 786 deletions(-)
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/BaseLoopTaskExecutor.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/BaseLoopTaskExecutor.java
deleted file mode 100644
index 4d52a38f73..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/BaseLoopTaskExecutor.java
+++ /dev/null
@@ -1,127 +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.plugin.task.api.loop;
-
-import org.apache.dolphinscheduler.plugin.task.api.AbstractRemoteTask;
-import org.apache.dolphinscheduler.plugin.task.api.TaskCallBack;
-import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
-import org.apache.dolphinscheduler.plugin.task.api.TaskException;
-import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
-import org.apache.dolphinscheduler.plugin.task.api.model.ApplicationInfo;
-import org.apache.dolphinscheduler.plugin.task.api.utils.RetryUtils;
-
-import java.time.Duration;
-
-import javax.annotation.Nullable;
-
-import lombok.NonNull;
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * This class is the base class for all loop task type.
- * <p>
- * The loop task type means, we will submit a task, and loop the task status
until the task is finished.
- */
-@Slf4j
-public abstract class BaseLoopTaskExecutor extends AbstractRemoteTask {
-
- /**
- * cancel flag
- */
- protected volatile boolean cancel = false;
-
- /**
- * The task instance info will be set when task has submitted successful.
- */
- protected @Nullable LoopTaskInstanceInfo loopTaskInstanceInfo;
-
- protected BaseLoopTaskExecutor(@NonNull TaskExecutionContext
taskExecutionContext) {
- super(taskExecutionContext);
- }
-
- @Override
- public void handle(TaskCallBack taskCallBack) throws TaskException {
- try {
- final long loopInterval =
getTaskInstanceStatusQueryInterval().toMillis();
- loopTaskInstanceInfo = submitLoopTask();
- this.setAppIds(loopTaskInstanceInfo.getTaskInstanceId());
-
taskCallBack.updateRemoteApplicationInfo(taskRequest.getTaskInstanceId(), new
ApplicationInfo(getAppIds()));
-
- // loop the task status until the task is finished or task has
been canceled.
- // we use retry utils here to avoid the task status query failure
due to network failure.
- // the default retry policy is 3 times, and the interval is 1
second.
- LoopTaskInstanceStatus loopTaskInstanceStatus = null;
- while (!cancel) {
- loopTaskInstanceStatus = RetryUtils.retryFunction(() ->
queryTaskInstanceStatus(loopTaskInstanceInfo));
- if (loopTaskInstanceStatus.isFinished()) {
- break;
- }
- Thread.sleep(loopInterval);
- }
- if (loopTaskInstanceStatus != null &&
loopTaskInstanceStatus.isSuccess()) {
- setExitStatusCode(TaskConstants.EXIT_CODE_SUCCESS);
- log.info("The task instance: {} execute successfully.",
appIds);
- } else {
- setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
- log.info("The task instance: {} is execute failure.", appIds);
- }
- } catch (InterruptedException e) {
- setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
- log.error("The current loop thread has been interrupted", e);
- Thread.currentThread().interrupt();
- throw new TaskException("The current loop thread has been
interrupted");
- } catch (TaskException ex) {
- // print the error message with task log.
- log.error("Loop task execute error", ex);
- setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
- throw ex;
- } catch (Exception ex) {
- setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
- log.error("Loop task execute error", ex);
- throw new TaskException("Loop task execute error", ex);
- }
- }
-
- /**
- * Submit the loop task, if submit failed, directly throw exception
- */
- public abstract @NonNull LoopTaskInstanceInfo submitLoopTask() throws
TaskException;
-
- /**
- * Query the loop task status, if query failed, directly throw exception
- */
- public abstract @NonNull LoopTaskInstanceStatus
queryTaskInstanceStatus(@NonNull LoopTaskInstanceInfo taskInstanceInfo) throws
TaskException;
-
- /**
- * Get the interval time to query the loop task status
- */
- public @NonNull Duration getTaskInstanceStatusQueryInterval() {
- return TaskConstants.DEFAULT_LOOP_STATUS_INTERVAL;
- }
-
- /**
- * Cancel the loop task, if cancel failed, directly throw exception
- */
- public abstract void cancelLoopTaskInstance(@Nullable LoopTaskInstanceInfo
taskInstanceInfo) throws TaskException;
-
- @Override
- public void cancelApplication() throws TaskException {
- this.cancel = true;
- cancelLoopTaskInstance(loopTaskInstanceInfo);
- }
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskCancelMethodDefinition.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskCancelMethodDefinition.java
deleted file mode 100644
index 95aa282751..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskCancelMethodDefinition.java
+++ /dev/null
@@ -1,26 +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.plugin.task.api.loop;
-
-import javax.annotation.Nullable;
-
-public interface LoopTaskCancelMethodDefinition extends
LoopTaskMethodDefinition {
-
- void cancelTaskInstance(@Nullable LoopTaskInstanceInfo
loopTaskInstanceInfo);
-
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskDefinition.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskDefinition.java
deleted file mode 100644
index d6d133f63a..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskDefinition.java
+++ /dev/null
@@ -1,48 +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.plugin.task.api.loop;
-
-import lombok.NonNull;
-
-public interface LoopTaskDefinition<SubmitTaskMethodT extends
LoopTaskSubmitTaskMethodDefinition, QueryTaskMethodT extends
LoopTaskQueryStatusMethodDefinition, CancelTaskMethodT extends
LoopTaskCancelMethodDefinition> {
-
- /**
- * The task name of this loop task, e.g: K8sPodTask
- */
- @NonNull
- String getTaskName();
-
- /**
- * Submit task method definition, each loop task should contain submit
task method.
- */
- @NonNull
- SubmitTaskMethodT getSubmitTaskMethod();
-
- /**
- * Query task method definition, each loop task should contain query task
method.
- */
- @NonNull
- QueryTaskMethodT getQueryTaskStateMethod();
-
- /**
- * Cancel task method definition, each loop task should contain cancel
task method, used to cancel the task instance
- */
- @NonNull
- CancelTaskMethodT getCancelTaskMethod();
-
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskInstanceInfo.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskInstanceInfo.java
deleted file mode 100644
index ec1ac467cb..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskInstanceInfo.java
+++ /dev/null
@@ -1,30 +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.plugin.task.api.loop;
-
-import lombok.NonNull;
-
-/**
- * The return result of {@link
LoopTaskSubmitTaskMethodDefinition#submitLoopTask()},
- * this can be used to query the task status.
- */
-public interface LoopTaskInstanceInfo {
-
- @NonNull
- String getTaskInstanceId();
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskInstanceStatus.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskInstanceStatus.java
deleted file mode 100644
index 78c610a87b..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskInstanceStatus.java
+++ /dev/null
@@ -1,38 +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.plugin.task.api.loop;
-
-/**
- * The return result of {@link
LoopTaskQueryStatusMethodDefinition#queryTaskInstanceStatus(LoopTaskInstanceInfo)}.
- */
-public interface LoopTaskInstanceStatus {
-
- /**
- * Judge if the task instance is finished.
- *
- * @return true if the task instance is finished, false otherwise.
- */
- boolean isFinished();
-
- /**
- * Judge if the task instance is success.
- *
- * @return true if the task instance is success, false otherwise.
- */
- boolean isSuccess();
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskMethodDefinition.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskMethodDefinition.java
deleted file mode 100644
index 344050eab3..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskMethodDefinition.java
+++ /dev/null
@@ -1,27 +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.plugin.task.api.loop;
-
-import lombok.NonNull;
-
-public interface LoopTaskMethodDefinition {
-
- @NonNull
- LoopTaskMethodType getLoopTaskMethodType();
-
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskMethodType.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskMethodType.java
deleted file mode 100644
index fc99a5b937..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskMethodType.java
+++ /dev/null
@@ -1,23 +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.plugin.task.api.loop;
-
-public enum LoopTaskMethodType {
- HTTP,
- ;
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskQueryStatusMethodDefinition.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskQueryStatusMethodDefinition.java
deleted file mode 100644
index 86d76c3e26..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskQueryStatusMethodDefinition.java
+++ /dev/null
@@ -1,34 +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.plugin.task.api.loop;
-
-import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
-
-import java.time.Duration;
-
-import lombok.NonNull;
-
-public interface LoopTaskQueryStatusMethodDefinition extends
LoopTaskMethodDefinition {
-
- @NonNull
- LoopTaskInstanceStatus queryTaskInstanceStatus(@NonNull
LoopTaskInstanceInfo taskInstanceInfo);
-
- default Duration getTaskInstanceStatusQueryInterval() {
- return TaskConstants.DEFAULT_LOOP_STATUS_INTERVAL;
- }
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskSubmitTaskMethodDefinition.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskSubmitTaskMethodDefinition.java
deleted file mode 100644
index b4c4e4b20b..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/LoopTaskSubmitTaskMethodDefinition.java
+++ /dev/null
@@ -1,26 +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.plugin.task.api.loop;
-
-import lombok.NonNull;
-
-public interface LoopTaskSubmitTaskMethodDefinition extends
LoopTaskMethodDefinition {
-
- @NonNull
- LoopTaskInstanceInfo submitLoopTask();
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/template/LoopTaskYamlDefinition.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/template/LoopTaskYamlDefinition.java
deleted file mode 100644
index 47756ce43a..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/template/LoopTaskYamlDefinition.java
+++ /dev/null
@@ -1,87 +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.plugin.task.api.loop.template;
-
-import java.io.Serializable;
-import java.util.Map;
-
-import lombok.Data;
-
-@Data
-public class LoopTaskYamlDefinition implements Serializable {
-
- // todo: support multiple services
- private LoopTaskServiceYamlDefinition service;
-
- @Data
- public static class LoopTaskServiceYamlDefinition implements Serializable {
-
- private String name;
- private String type;
- private LoopTaskAPIYamlDefinition api;
- }
-
- @Data
- public static class LoopTaskAPIYamlDefinition implements Serializable {
-
- private LoopTaskSubmitMethodYamlDefinition submit;
- private LoopTaskQueryStateYamlDefinition queryState;
- private LoopTaskCancelYamlDefinition cancel;
- }
-
- @Data
- @SuppressWarnings("checkstyle:ModifierOrder")
- public static abstract class LoopTaskMethodYamlDefinition {
-
- private String url;
- private String method;
- private String dataType;
- private Map<String, String> httpHeaders;
- private Map<String, Object> requestParams;
- private Map<String, Object> requestBody;
- }
-
- @Data
- public static class LoopTaskSubmitMethodYamlDefinition extends
LoopTaskMethodYamlDefinition {
-
- /**
- * Used to extract the given params from the task params.
- */
- private Map<String, String> taskParamsExtractJPath;
-
- /**
- * Used to extract task instance id from response
- */
- private String taskInstanceIdJPath;
- }
-
- @Data
- public static class LoopTaskQueryStateYamlDefinition extends
LoopTaskMethodYamlDefinition {
-
- /**
- * Used to extract taskInstance finished state from response
- * todo: we need to support the function to calculate the finished
state
- */
- private String taskInstanceFinishedJPath;
- }
-
- @Data
- public static class LoopTaskCancelYamlDefinition extends
LoopTaskMethodYamlDefinition {
- }
-
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/template/TaskDefinitionParser.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/template/TaskDefinitionParser.java
deleted file mode 100644
index d2d61ca8e8..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/loop/template/TaskDefinitionParser.java
+++ /dev/null
@@ -1,32 +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.plugin.task.api.loop.template;
-
-import org.apache.dolphinscheduler.plugin.task.api.loop.LoopTaskDefinition;
-
-import lombok.NonNull;
-
-public interface TaskDefinitionParser<TaskDefinitionT extends
LoopTaskDefinition<?, ?, ?>> {
-
- /**
- * Generate the {@link LoopTaskDefinition} from the given yaml config file.
- */
- @NonNull
- TaskDefinitionT parse(@NonNull String yamlConfigFile);
-
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/DynamicInputParameter.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/DynamicInputParameter.java
deleted file mode 100644
index cd5c1005c4..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/DynamicInputParameter.java
+++ /dev/null
@@ -1,37 +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.plugin.task.api.model;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.NonNull;
-
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class DynamicInputParameter {
-
- @NonNull
- private String name;
- @NonNull
- private String value;
- private String separator = ",";
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/JdbcInfo.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/JdbcInfo.java
deleted file mode 100644
index 5e90dffbfe..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/model/JdbcInfo.java
+++ /dev/null
@@ -1,49 +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.plugin.task.api.model;
-
-import java.util.Map;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * JdbcInfo
- */
-@Data
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
-public class JdbcInfo {
-
- private String host;
-
- private String port;
-
- private String driverName;
-
- private String database;
-
- private Map<String, String> params;
-
- private String address;
-
- private String jdbcUrl;
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/DynamicParameters.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/DynamicParameters.java
deleted file mode 100644
index 57cd4f6b20..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/DynamicParameters.java
+++ /dev/null
@@ -1,58 +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.plugin.task.api.parameters;
-
-import org.apache.dolphinscheduler.plugin.task.api.model.DynamicInputParameter;
-
-import java.util.List;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.NoArgsConstructor;
-
-@EqualsAndHashCode(callSuper = true)
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class DynamicParameters extends AbstractParameters {
-
- private long workflowDefinitionCode;
-
- private int maxNumOfSubWorkflowInstances;
-
- private int degreeOfParallelism;
-
- private String filterCondition;
-
- private List<DynamicInputParameter> listParameters;
-
- @Override
- public boolean checkParameters() {
- try {
- if (listParameters == null || listParameters.isEmpty()) {
- return false;
- }
- } catch (Exception e) {
- return false;
- }
- return this.workflowDefinitionCode != 0;
- }
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-chunjun/src/main/java/org/apache/dolphinscheduler/plugin/task/chunjun/ChunJunTaskExecutionContext.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-chunjun/src/main/java/org/apache/dolphinscheduler/plugin/task/chunjun/ChunJunTaskExecutionContext.java
deleted file mode 100644
index eb2bfb62d2..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-chunjun/src/main/java/org/apache/dolphinscheduler/plugin/task/chunjun/ChunJunTaskExecutionContext.java
+++ /dev/null
@@ -1,62 +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.plugin.task.chunjun;
-
-import org.apache.dolphinscheduler.spi.enums.DbType;
-
-import java.io.Serializable;
-
-import lombok.Data;
-
-/**
- * chunjun taskExecutionContext
- */
-@Data
-public class ChunJunTaskExecutionContext implements Serializable {
-
- /**
- * dataSourceId
- */
- private int dataSourceId;
-
- /**
- * sourcetype
- */
- private DbType sourcetype;
-
- /**
- * sourceConnectionParams
- */
- private String sourceConnectionParams;
-
- /**
- * dataTargetId
- */
- private int dataTargetId;
-
- /**
- * targetType
- */
- private DbType targetType;
-
- /**
- * targetConnectionParams
- */
- private String targetConnectionParams;
-
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-java/src/main/java/org/apache/dolphinscheduler/plugin/task/java/exception/JavaSourceFileExistException.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-java/src/main/java/org/apache/dolphinscheduler/plugin/task/java/exception/JavaSourceFileExistException.java
deleted file mode 100644
index 6599ff24cf..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-java/src/main/java/org/apache/dolphinscheduler/plugin/task/java/exception/JavaSourceFileExistException.java
+++ /dev/null
@@ -1,41 +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.plugin.task.java.exception;
-
-public class JavaSourceFileExistException extends RuntimeException {
-
- public JavaSourceFileExistException() {
- }
-
- public JavaSourceFileExistException(String message) {
- super(message);
- }
-
- public JavaSourceFileExistException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public JavaSourceFileExistException(Throwable cause) {
- super(cause);
- }
-
- public JavaSourceFileExistException(String message, Throwable cause,
boolean enableSuppression,
- boolean writableStackTrace) {
- super(message, cause, enableSuppression, writableStackTrace);
- }
-}
diff --git
a/dolphinscheduler-task-plugin/dolphinscheduler-task-java/src/main/java/org/apache/dolphinscheduler/plugin/task/java/exception/PublicClassNotFoundException.java
b/dolphinscheduler-task-plugin/dolphinscheduler-task-java/src/main/java/org/apache/dolphinscheduler/plugin/task/java/exception/PublicClassNotFoundException.java
deleted file mode 100644
index 103c443378..0000000000
---
a/dolphinscheduler-task-plugin/dolphinscheduler-task-java/src/main/java/org/apache/dolphinscheduler/plugin/task/java/exception/PublicClassNotFoundException.java
+++ /dev/null
@@ -1,41 +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.plugin.task.java.exception;
-
-public class PublicClassNotFoundException extends RuntimeException {
-
- public PublicClassNotFoundException() {
- }
-
- public PublicClassNotFoundException(String message) {
- super(message);
- }
-
- public PublicClassNotFoundException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public PublicClassNotFoundException(Throwable cause) {
- super(cause);
- }
-
- public PublicClassNotFoundException(String message, Throwable cause,
boolean enableSuppression,
- boolean writableStackTrace) {
- super(message, cause, enableSuppression, writableStackTrace);
- }
-}