Browse Source

remove the duplicate function in MasterExecThread (#3329)

Co-authored-by: sunchaohe <sunzhaohe@linklogis.com>
pull/3/MERGE
zixi0825 4 years ago committed by GitHub
parent
commit
78856fb08e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java

20
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java

@ -802,7 +802,7 @@ public class MasterExecThread implements Runnable {
ProcessInstance instance = processService.findProcessInstanceById(processInstance.getId()); ProcessInstance instance = processService.findProcessInstanceById(processInstance.getId());
ExecutionStatus state = instance.getState(); ExecutionStatus state = instance.getState();
if(activeTaskNode.size() > 0 || retryTaskExists()){ if(activeTaskNode.size() > 0 || hasRetryTaskInStandBy()){
// active task and retry task exists // active task and retry task exists
return runningState(state); return runningState(state);
} }
@ -852,24 +852,6 @@ public class MasterExecThread implements Runnable {
return state; return state;
} }
/**
* whether standby task list have retry tasks
* @return
*/
private boolean retryTaskExists() {
boolean result = false;
for(String taskName : readyToSubmitTaskList.keySet()){
TaskInstance task = readyToSubmitTaskList.get(taskName);
if(task.getState().typeIsFailure()){
result = true;
break;
}
}
return result;
}
/** /**
* whether complement end * whether complement end
* @return Boolean whether is complement end * @return Boolean whether is complement end

Loading…
Cancel
Save