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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to