Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public class SeatunnelFlinkParameters extends SeatunnelParameters {
public enum RunModeEnum {

NONE("none"),
RUN("--deploy-mode run"),
RUN_APPLICATION("--deploy-mode run-application");
RUN("--master run"),
RUN_APPLICATION("--master run-application");

private final String command;

RunModeEnum(String command) {
this.command = command;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.dolphinscheduler.plugin.task.seatunnel.spark;

import static org.apache.dolphinscheduler.plugin.task.seatunnel.Constants.DEPLOY_MODE_OPTIONS;
import static org.apache.dolphinscheduler.plugin.task.seatunnel.Constants.MASTER_OPTIONS;

import org.apache.dolphinscheduler.common.utils.JSONUtils;
Expand Down Expand Up @@ -51,19 +50,18 @@ public void init() {
@Override
public List<String> buildOptions() throws Exception {
List<String> args = super.buildOptions();
args.add(DEPLOY_MODE_OPTIONS);
args.add(seatunnelParameters.getDeployMode().getCommand());

MasterTypeEnum master = DeployModeEnum.local == seatunnelParameters.getDeployMode() ? MasterTypeEnum.LOCAL
: seatunnelParameters.getMaster();

args.add(MASTER_OPTIONS);
if (MasterTypeEnum.SPARK.equals(master) || MasterTypeEnum.MESOS.equals(master)) {
args.add(master.getCommand() + seatunnelParameters.getMasterUrl());
if (DeployModeEnum.local == seatunnelParameters.getDeployMode()) {
args.add(MASTER_OPTIONS);
args.add(MasterTypeEnum.LOCAL.getCommand());
} else {
args.add(master.getCommand());
MasterTypeEnum master = seatunnelParameters.getMaster();
args.add(MASTER_OPTIONS);
if (MasterTypeEnum.SPARK.equals(master) || MasterTypeEnum.MESOS.equals(master)) {
args.add(master.getCommand() + seatunnelParameters.getMasterUrl());
} else {
args.add(master.getCommand());
}
}

return args;
}
}
}
Loading