KaiSong-UK opened a new pull request, #18450:
URL: https://github.com/apache/dolphinscheduler/pull/18450

   ## Summary
   
   When stopping a Flink task via the DolphinScheduler UI, if the Flink job has 
already finished (process exited or Yarn application completed), the `yarn 
application -kill` command fails with an error like 
"ApplicationNotFoundException" or "doesn't exist". This causes the task stop to 
report an error.
   
   ## Solution
   
   Add a helper method `isApplicationAlreadyFinished()` in 
`YarnApplicationManager` to detect when the kill command failure is due to the 
application already being terminated. When this is detected, log at INFO level 
instead of ERROR and treat it as a success case.
   
   ## Changes
   
   - Modified `YarnApplicationManager.killApplication()` catch block to check 
if the exception indicates the application is already finished
   - Added `isApplicationAlreadyFinished()` method that checks for common 
"already finished" error messages: "doesn't exist", "not found", "No such 
process", "ApplicationNotFoundException", "not running"
   
   Closes #16789
   


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