From 03582f2e7039498d5563626b88dd8616d163c3f3 Mon Sep 17 00:00:00 2001 From: Assert <42203474+shangeyao@users.noreply.github.com> Date: Wed, 10 Aug 2022 12:54:09 +0800 Subject: [PATCH] =?UTF-8?q?[Fix-11376][task=20plugin]Seatunnel=20Task=20ca?= =?UTF-8?q?nnot=20save=20successfully=20when=20=E2=80=A6=20(#11377)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seatunnel/spark/SeatunnelSparkParameters.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/spark/SeatunnelSparkParameters.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/spark/SeatunnelSparkParameters.java index 1cc5285f39..a21538e9b5 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/spark/SeatunnelSparkParameters.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/spark/SeatunnelSparkParameters.java @@ -33,10 +33,14 @@ public class SeatunnelSparkParameters extends SeatunnelParameters { @Override public boolean checkParameters() { - return super.checkParameters() - && Objects.nonNull(deployMode) - && (DeployModeEnum.local != deployMode && Objects.nonNull(master)) - && (DeployModeEnum.local != deployMode && (MasterTypeEnum.SPARK == master || MasterTypeEnum.MESOS == master) && StringUtils.isNotBlank(masterUrl)); + boolean result = super.checkParameters() && Objects.nonNull(deployMode); + if (result && DeployModeEnum.local != deployMode) { + result = Objects.nonNull(master); + if (result && (MasterTypeEnum.SPARK == master || MasterTypeEnum.MESOS == master)) { + result = StringUtils.isNotBlank(masterUrl); + } + } + return result; } public static enum MasterTypeEnum {