From 05f3417ea402fa096c1ef12718839437cf6d8026 Mon Sep 17 00:00:00 2001 From: caishunfeng Date: Fri, 6 Jan 2023 12:44:12 +1100 Subject: [PATCH] fix k8s task run fail (#13348) --- .../plugin/task/api/k8s/impl/K8sTaskExecutor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java index 98dd262f66..5fe03bba4a 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/k8s/impl/K8sTaskExecutor.java @@ -141,8 +141,13 @@ public class K8sTaskExecutor extends AbstractK8sTaskExecutor { @Override public void eventReceived(Action action, Job job) { + logger.info("event received : job:{} action:{}", job.getMetadata().getName(), action); if (action != Action.ADDED) { int jobStatus = getK8sJobStatus(job); + logger.info("job {} status {}", job.getMetadata().getName(), jobStatus); + if (jobStatus == TaskConstants.RUNNING_CODE) { + return; + } setTaskStatus(jobStatus, taskInstanceId, taskResponse, k8STaskMainParameters); countDownLatch.countDown(); }