You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/14 12:13:02 UTC
[GitHub] [dolphinscheduler] caishunfeng commented on a diff in pull request #11871: [Improvement-#11863][task-plugin] add the function of stopping SQL type tasks
caishunfeng commented on code in PR #11871:
URL: https://github.com/apache/dolphinscheduler/pull/11871#discussion_r970725234
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -167,7 +173,13 @@ public void handle(TaskCallBack taskCallBack) throws TaskException {
@Override
public void cancel() throws TaskException {
-
+ String type = sqlParameters.getType();
+ if (DbType.HIVE == DbType.valueOf(type)) {
+ List<String> appIds = ProcessUtils.killYarnJob(taskExecutionContext);
Review Comment:
> Can we move this in `org.apache.dolphinscheduler.plugin.task.api.ProcessUtils` cc @caishunfeng
Yes, agree with wenjun, we shouldn't maintain multiple copies of the same code
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/pom.xml:
##########
@@ -44,6 +44,12 @@
<artifactId>dolphinscheduler-datasource-all</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.dolphinscheduler</groupId>
+ <artifactId>dolphinscheduler-server</artifactId>
+ <version>${project.version}</version>
+ </dependency>
Review Comment:
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org