njnu-seafish commented on issue #17317:
URL: 
https://github.com/apache/dolphinscheduler/issues/17317#issuecomment-3043982220

   > > Well, As mentioned in the issue:
   > > Create a new Spark task type submitted by Yarn Cluster, select the op 
tenant to submit and run, and then Kill the task on the UI; It was found that 
the task process on the Worker machine was Killed, but the associated Yarn task 
was not Killed.
   > 
   > This is caused by `sudo -u dolphinscheduler yarn application -kill 
application_1749462877863_1818, an error will occur: yarn: command not found`. 
I still don't get it why this is a bug.
   
   Thanks.
   The first bug caused only the local process to be killed, while the Yarn 
application remained unaffected.
   some codes should be added :
   `
   public void cancelApplication() throws InterruptedException {
           if (process == null) {
               return;
           }
           **// Try to kill yarn or k8s application
           ProcessUtils.cancelApplication(taskRequest);**
           // Try to kill system process tree
           boolean killed = ProcessUtils.kill(taskRequest);
           if (killed) {
               log.info("Process tree for task: {} is killed or already 
finished, pid: {}",
                       taskRequest.getTaskAppId(), taskRequest.getProcessId());
           } else {
               log.error("Failed to kill process tree for task: {}, pid: {}",
                       taskRequest.getTaskAppId(), taskRequest.getProcessId());
           }
       }
   `
   
   Can the Yarn application be killed in your environment?
   
   
   After fixing the first bug, the third bug gets triggered: `sudo -u 
dolphinscheduler yarn application -kill application_1749462877863_1818, an 
error will occur: yarn: command not found`.  Due to this bug, the Yarn 
application can't be killed properly.


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