From 4f09ff36ddea487bd54ada8b4b5167aca57bd191 Mon Sep 17 00:00:00 2001 From: lenboo Date: Fri, 14 Jun 2019 18:06:54 +0800 Subject: [PATCH] update --- .../cn/escheduler/server/master/runner/MasterExecThread.java | 3 +++ .../src/main/java/cn/escheduler/server/zk/ZKMasterClient.java | 1 + .../java/cn/escheduler/server/master/MasterCommandTest.java | 3 +++ 3 files changed, 7 insertions(+) diff --git a/escheduler-server/src/main/java/cn/escheduler/server/master/runner/MasterExecThread.java b/escheduler-server/src/main/java/cn/escheduler/server/master/runner/MasterExecThread.java index 118922c822..cb38c7a722 100644 --- a/escheduler-server/src/main/java/cn/escheduler/server/master/runner/MasterExecThread.java +++ b/escheduler-server/src/main/java/cn/escheduler/server/master/runner/MasterExecThread.java @@ -432,6 +432,9 @@ public class MasterExecThread implements Runnable { } for (String nodeName : startVertex){ + if(completeTaskList.containsKey(nodeName)){ + continue; + } // encapsulation task instance TaskInstance taskInstance = createTaskInstance(processInstance, nodeName , dag.getNode(nodeName),parentNodeName); diff --git a/escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java b/escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java index 3066504a46..85c805e2fc 100644 --- a/escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java +++ b/escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java @@ -136,6 +136,7 @@ public class ZKMasterClient extends AbstractZKClient { // check if fault tolerance is required,failure and tolerance if (getActiveMasterNum() == 1) { + failoverWorker(null, true); // processDao.masterStartupFaultTolerant(); failoverMaster(null); } diff --git a/escheduler-server/src/test/java/cn/escheduler/server/master/MasterCommandTest.java b/escheduler-server/src/test/java/cn/escheduler/server/master/MasterCommandTest.java index cfa723105d..114d9d3a84 100644 --- a/escheduler-server/src/test/java/cn/escheduler/server/master/MasterCommandTest.java +++ b/escheduler-server/src/test/java/cn/escheduler/server/master/MasterCommandTest.java @@ -38,6 +38,7 @@ import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Collection; +import java.util.Map; /** * master test @@ -135,6 +136,8 @@ public class MasterCommandTest { System.out.println(start.toString()); + Map forbidden = DagHelper.getForbiddenTaskNodeMaps(processDefinition.getProcessDefinitionJson()); + System.out.println(forbidden); } catch (Exception e) { e.printStackTrace(); }