From b0113a9b642c51ae6e3f0ddc789e55dd0bce888e Mon Sep 17 00:00:00 2001 From: xiangzihao <460888207@qq.com> Date: Fri, 24 Jun 2022 16:48:58 +0800 Subject: [PATCH] dependent node log output optimization and fix checkstyle (#10593) (cherry picked from commit 397e51fa63b39bc2ec2d68091c5b613aad7fa4ac) --- .../master/runner/task/DependentTaskProcessor.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/DependentTaskProcessor.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/DependentTaskProcessor.java index d17f4b6419..ee535d997b 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/DependentTaskProcessor.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/DependentTaskProcessor.java @@ -17,13 +17,12 @@ package org.apache.dolphinscheduler.server.master.runner.task; -import static org.apache.dolphinscheduler.common.Constants.DEPENDENT_SPLIT; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_DEPENDENT; -import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy; import org.apache.dolphinscheduler.common.utils.NetUtils; import org.apache.dolphinscheduler.plugin.task.api.enums.DependResult; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; +import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy; import org.apache.dolphinscheduler.plugin.task.api.model.DependentTaskModel; import org.apache.dolphinscheduler.plugin.task.api.parameters.DependentParameters; import org.apache.dolphinscheduler.plugin.task.api.utils.DependentUtils; @@ -111,8 +110,8 @@ public class DependentTaskProcessor extends BaseTaskProcessor { && TaskTimeoutStrategy.WARNFAILED != taskTimeoutStrategy) { return true; } - logger.info("dependent task {} timeout, strategy {} ", - taskInstance.getId(), taskTimeoutStrategy.getDescp()); + logger.info("dependent taskInstanceId: {} timeout, taskName: {}, strategy: {} ", + taskInstance.getId(), taskInstance.getName(), taskTimeoutStrategy.getDescp()); result = DependResult.FAILED; endTask(); return true; @@ -161,7 +160,7 @@ public class DependentTaskProcessor extends BaseTaskProcessor { if (!dependResultMap.containsKey(entry.getKey())) { dependResultMap.put(entry.getKey(), entry.getValue()); //save depend result to log - logger.info("dependent item complete {} {},{}", DEPENDENT_SPLIT, entry.getKey(), entry.getValue()); + logger.info("dependent item complete, task: {}, result: {}", entry.getKey(), entry.getValue()); } } if (!dependentExecute.finish(dependentDate)) { @@ -183,7 +182,7 @@ public class DependentTaskProcessor extends BaseTaskProcessor { dependResultList.add(dependResult); } result = DependentUtils.getDependResultForRelation(this.dependentParameters.getRelation(), dependResultList); - logger.info("dependent task completed, dependent result:{}", result); + logger.info("dependent task completed, dependent result: {}", result); return result; }