skymsg commented on a change in pull request #5665:
URL: https://github.com/apache/dolphinscheduler/pull/5665#discussion_r663652472



##########
File path: 
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
##########
@@ -207,17 +203,10 @@ public CommandExecuteResult run(String execCommand) 
throws Exception {
 
         // if SHELL task exit
         if (status) {
-            // set appIds
-            List<String> appIds = getAppIds(taskExecutionContext.getLogPath());
-            result.setAppIds(String.join(Constants.COMMA, appIds));
 
             // SHELL task state
             result.setExitStatusCode(process.exitValue());
 
-            // if yarn task , yarn state is final state
-            if (process.exitValue() == 0) {
-                result.setExitStatusCode(isSuccessOfYarnState(appIds) ? 
EXIT_CODE_SUCCESS : EXIT_CODE_FAILURE);
-            }
         } else {
             logger.error("process has failure , exitStatusCode:{}, 
processExitValue:{}, ready to kill ...",
                  result.getExitStatusCode(), process.exitValue());

Review comment:
       the cancelApplication method  of  AbstractYarnTask  would call 
ProcessUtils.killYarnJob(taskExecutionContext)  for itself
   ```java
       public void cancelApplication(boolean status) throws Exception {
           cancel = true;
           // cancel process
           shellCommandExecutor.cancelApplication();
           TaskInstance taskInstance = 
processService.findTaskInstanceById(taskExecutionContext.getTaskInstanceId());
           if (status && taskInstance != null) {
               ProcessUtils.killYarnJob(taskExecutionContext);
           }
       }
   ```




-- 
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