[Fix-13780][api] Fix the problem of process instance DAG can't show dependent task (#13823)
This commit is contained in:
parent
81aa105ff6
commit
7835ddfdb7
|
|
@ -526,11 +526,12 @@ public class ProcessInstanceServiceImpl extends BaseServiceImpl implements Proce
|
|||
}
|
||||
String dependResultString = tmpStringArray[1];
|
||||
String[] dependStringArray = dependResultString.split(",");
|
||||
if (dependStringArray.length != 2) {
|
||||
if (dependStringArray.length != 3) {
|
||||
continue;
|
||||
}
|
||||
String key = dependStringArray[0].trim();
|
||||
DependResult dependResult = DependResult.valueOf(dependStringArray[1].trim());
|
||||
String key = dependStringArray[0].trim().split(":")[1].trim();
|
||||
String result = dependStringArray[1].trim().split(":")[1].trim();
|
||||
DependResult dependResult = DependResult.valueOf(result);
|
||||
resultMap.put(key, dependResult);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ public class ProcessInstanceServiceTest {
|
|||
public void testParseLogForDependentResult() throws IOException {
|
||||
String logString =
|
||||
"[INFO] 2019-03-19 17:11:08.475 org.apache.dolphinscheduler.server.worker.log.TaskLogger:[172]"
|
||||
+ " - [taskAppId=TASK_223_10739_452334] dependent item complete :|| 223-ALL-day-last1Day,SUCCESS\n"
|
||||
+ " - [taskAppId=TASK_223_10739_452334] dependent item complete, :|| dependentKey: 223-ALL-day-last1Day, result: SUCCESS, dependentDate: Wed Mar 19 17:10:36 CST 2019\n"
|
||||
+ "[INFO] 2019-03-19 17:11:08.476 org.apache.dolphinscheduler.server.worker.runner.TaskScheduleThread:[172]"
|
||||
+ " - task : 223_10739_452334 exit status code : 0\n"
|
||||
+ "[root@node2 current]# ";
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package org.apache.dolphinscheduler.server.master.runner.task;
|
||||
|
||||
import static org.apache.dolphinscheduler.common.constants.Constants.DEPENDENT_SPLIT;
|
||||
import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_DEPENDENT;
|
||||
|
||||
import org.apache.dolphinscheduler.common.constants.Constants;
|
||||
|
|
@ -255,8 +256,8 @@ public class DependentTaskProcessor extends BaseTaskProcessor {
|
|||
if (!dependResultMap.containsKey(entry.getKey())) {
|
||||
dependResultMap.put(entry.getKey(), entry.getValue());
|
||||
// save depend result to log
|
||||
log.info("dependent item complete, dependentKey: {}, result: {}, dependentDate: {}",
|
||||
entry.getKey(), entry.getValue(), dependentDate);
|
||||
log.info("dependent item complete, {} dependentKey: {}, result: {}, dependentDate: {}",
|
||||
DEPENDENT_SPLIT, entry.getKey(), entry.getValue(), dependentDate);
|
||||
}
|
||||
}
|
||||
if (!dependentExecute.finish(dependentDate, testFlag)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue