Browse Source

update

pull/2/head
lenboo 6 years ago
parent
commit
4f09ff36dd
  1. 3
      escheduler-server/src/main/java/cn/escheduler/server/master/runner/MasterExecThread.java
  2. 1
      escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java
  3. 3
      escheduler-server/src/test/java/cn/escheduler/server/master/MasterCommandTest.java

3
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){ for (String nodeName : startVertex){
if(completeTaskList.containsKey(nodeName)){
continue;
}
// encapsulation task instance // encapsulation task instance
TaskInstance taskInstance = createTaskInstance(processInstance, nodeName , TaskInstance taskInstance = createTaskInstance(processInstance, nodeName ,
dag.getNode(nodeName),parentNodeName); dag.getNode(nodeName),parentNodeName);

1
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 // check if fault tolerance is required,failure and tolerance
if (getActiveMasterNum() == 1) { if (getActiveMasterNum() == 1) {
failoverWorker(null, true);
// processDao.masterStartupFaultTolerant(); // processDao.masterStartupFaultTolerant();
failoverMaster(null); failoverMaster(null);
} }

3
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.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Map;
/** /**
* master test * master test
@ -135,6 +136,8 @@ public class MasterCommandTest {
System.out.println(start.toString()); System.out.println(start.toString());
Map<String, TaskNode> forbidden = DagHelper.getForbiddenTaskNodeMaps(processDefinition.getProcessDefinitionJson());
System.out.println(forbidden);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }

Loading…
Cancel
Save