From 8651d39a29b69abcb677ae3a040282b08d14fabc Mon Sep 17 00:00:00 2001 From: Wenjun Ruan Date: Thu, 22 Feb 2024 19:07:08 +0800 Subject: [PATCH] Fix out parameter may loss --- .../task/api/parameters/AbstractParameters.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/AbstractParameters.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/AbstractParameters.java index 6ca1be7d7aad..4e186c98f0d6 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/AbstractParameters.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/parameters/AbstractParameters.java @@ -36,11 +36,11 @@ import java.util.Map; import java.util.Objects; -import lombok.extern.slf4j.Slf4j; - import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; +import lombok.extern.slf4j.Slf4j; + @Slf4j public abstract class AbstractParameters implements IParameters { @@ -161,8 +161,11 @@ public void dealOutParam(Map taskOutputParams) { if (StringUtils.isNotEmpty(propValue)) { info.setValue(propValue); addPropertyToValPool(info); - } else { - log.warn("Cannot find the output parameter {} in the task output parameters", info.getProp()); + continue; + } + addPropertyToValPool(info); + if (StringUtils.isEmpty(info.getValue())) { + log.warn("The output parameter {} value is empty and cannot find the out parameter from task output", info); } } }