From ba0a253f09fa55e1100a1f340eca9bde7d88a682 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 414c9c6302..27a31818f4 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 @@ -155,8 +155,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(); }