From 9664bef9334be7ad907f6127caa344bfe97ed77d Mon Sep 17 00:00:00 2001 From: Kerwin <37063904+zhuangchong@users.noreply.github.com> Date: Thu, 20 Jul 2023 12:26:10 +0800 Subject: [PATCH] Fix wrong judgment condition when building parameters of seatunnel task node. (#14594) --- .../task/seatunnel/flink/SeatunnelFlinkTask.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/flink/SeatunnelFlinkTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/flink/SeatunnelFlinkTask.java index 32d5fa3e05..7918c6d183 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/flink/SeatunnelFlinkTask.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/flink/SeatunnelFlinkTask.java @@ -44,13 +44,12 @@ public class SeatunnelFlinkTask extends SeatunnelTask { @Override public List buildOptions() throws Exception { List args = super.buildOptions(); - if (!(Objects.isNull(seatunnelParameters.getRunMode()) - && SeatunnelFlinkParameters.RunModeEnum.NONE.equals(seatunnelParameters.getRunMode()))) { - args.add( - Objects.isNull(seatunnelParameters.getRunMode()) - ? SeatunnelFlinkParameters.RunModeEnum.RUN.getCommand() - : seatunnelParameters.getRunMode().getCommand()); + + if (Objects.nonNull(seatunnelParameters.getRunMode()) + && !SeatunnelFlinkParameters.RunModeEnum.NONE.equals(seatunnelParameters.getRunMode())) { + args.add(seatunnelParameters.getRunMode().getCommand()); } + if (StringUtils.isNotBlank(seatunnelParameters.getOthers())) { args.add(seatunnelParameters.getOthers()); }