ruanwenjun opened a new issue #5564: URL: https://github.com/apache/dolphinscheduler/issues/5564
**Describe the question** Currently, there are multiple task use `ShellCommandExecutor` to run task, such as `DataxTask`、`ShellTask`、`FlinkTask`, `SparkTask` etc. In the `ShellCommandExecutor`, after executing the task, it will query the task status from yarn(if it can find applicationId from log), and check the status. It is not reasonable, sometimes this will cause task failure. https://github.com/apache/dolphinscheduler/blob/f8ecb536b71d6f33b71c73930832b62890b84ea1/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java#L214-L224 We should move the check logic to `AbstractYarnTask`. BYW, use `ExecutionStatus.FAILURE.equals(applicationStatus)` to avoid NPE. https://github.com/apache/dolphinscheduler/blob/f8ecb536b71d6f33b71c73930832b62890b84ea1/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java#L415-L420 **Which version of DolphinScheduler:** -[1.3.6] -[dev] -- 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. For queries about this service, please contact Infrastructure at: [email protected]
