You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by le...@apache.org on 2021/12/05 07:27:48 UTC

[dolphinscheduler] branch 2.0.1-prepare updated: [2.0.1-cherry-pick] fix bug : Tez state, complement data kill, dependent node (#7188)

This is an automated email from the ASF dual-hosted git repository.

leonbao pushed a commit to branch 2.0.1-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/2.0.1-prepare by this push:
     new 0b376f7  [2.0.1-cherry-pick] fix bug : Tez state, complement data kill, dependent node (#7188)
0b376f7 is described below

commit 0b376f7f901efb8724dd2993d82dd2e745503350
Author: wind <ca...@users.noreply.github.com>
AuthorDate: Sun Dec 5 15:27:41 2021 +0800

    [2.0.1-cherry-pick] fix bug : Tez state, complement data kill, dependent node (#7188)
    
    * [Fix-7037][dolphincheduler-server] process instance can not be killed when complement data (#7140)
    
    * fix bug 7037
    
    * update processComplementData
    
    Co-authored-by: SbloodyS <sb...@qq.com>
    
    * [Fix-5551][common] Fix ExecutionStatus for hive-on-Tez application (#6289)
    
    * add ENDED state
    
    * Update HadoopUtils.java
    
    * [Fix-7093][dolphincheduler-server] fix dependent node stuck in running (#7116)
    
    * fix bug 7093
    
    * remove redundant else
    
    Co-authored-by: SbloodyS <sb...@qq.com>
    
    Co-authored-by: SbloodyS <46...@qq.com>
    Co-authored-by: SbloodyS <sb...@qq.com>
    Co-authored-by: Manhua <ke...@qq.com>
---
 .../src/main/java/org/apache/dolphinscheduler/common/Constants.java   | 4 ++++
 .../java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java    | 1 +
 .../server/master/runner/StateWheelExecuteThread.java                 | 3 +--
 .../dolphinscheduler/server/master/runner/WorkflowExecuteThread.java  | 4 ++++
 4 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
index 7f97c9c..e564b1d 100644
--- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
+++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
@@ -659,6 +659,10 @@ public final class Constants {
      */
     public static final String SUCCEEDED = "SUCCEEDED";
     /**
+     * ENDED
+     */
+    public static final String ENDED = "ENDED";
+    /**
      * NEW
      */
     public static final String NEW = "NEW";
diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
index 8f2e234..3b6ac17 100644
--- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
+++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
@@ -453,6 +453,7 @@ public class HadoopUtils implements Closeable {
             case Constants.ACCEPTED:
                 return ExecutionStatus.SUBMITTED_SUCCESS;
             case Constants.SUCCEEDED:
+            case Constants.ENDED:
                 return ExecutionStatus.SUCCESS;
             case Constants.NEW:
             case Constants.NEW_SAVING:
diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
index f2b10f7..50406cc 100644
--- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
+++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
@@ -91,9 +91,8 @@ public class StateWheelExecuteThread extends Thread {
         for (TaskInstance taskInstance : this.taskInstanceCheckList.values()) {
             if (TimeoutFlag.OPEN == taskInstance.getTaskDefine().getTimeoutFlag()) {
                 long timeRemain = DateUtils.getRemainTime(taskInstance.getStartTime(), taskInstance.getTaskDefine().getTimeout() * Constants.SEC_2_MINUTES_TIME_UNIT);
-                if (0 <= timeRemain && processTimeout(taskInstance)) {
+                if (0 >= timeRemain && processTimeout(taskInstance)) {
                     taskInstanceCheckList.remove(taskInstance.getId());
-                    return;
                 }
             }
             if (taskInstance.taskCanRetry() && taskInstance.retryTaskIntervalOverTime()) {
diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
index 8c19a6a..1e45ec4 100644
--- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
+++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
@@ -404,6 +404,10 @@ public class WorkflowExecuteThread implements Runnable {
             return false;
         }
 
+        if (processInstance.getState() == ExecutionStatus.READY_STOP) {
+            return false;
+        }
+
         Date scheduleDate = processInstance.getScheduleTime();
         if (scheduleDate == null) {
             scheduleDate = complementListDate.get(0);