Browse Source

cherry-pick [Bug] [Seatunnel-Task] Run Mode defaults to run, and you cannot select a null value

#14267
3.1.8-release
zyfjrx 1 year ago committed by zhuangchong
parent
commit
fa0eb467a8
  1. 1
      dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/flink/SeatunnelFlinkParameters.java
  2. 8
      dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/flink/SeatunnelFlinkTask.java
  3. 4
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-sea-tunnel.ts

1
dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/flink/SeatunnelFlinkParameters.java

@ -35,6 +35,7 @@ public class SeatunnelFlinkParameters extends SeatunnelParameters {
@Getter @Getter
public enum RunModeEnum { public enum RunModeEnum {
NONE("none"),
RUN("--run-mode run"), RUN("--run-mode run"),
RUN_APPLICATION("--run-mode run-application"); RUN_APPLICATION("--run-mode run-application");

8
dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/flink/SeatunnelFlinkTask.java

@ -43,7 +43,13 @@ public class SeatunnelFlinkTask extends SeatunnelTask {
@Override @Override
public List<String> buildOptions() throws Exception { public List<String> buildOptions() throws Exception {
List<String> args = super.buildOptions(); List<String> args = super.buildOptions();
args.add(Objects.isNull(seatunnelParameters.getRunMode()) ? SeatunnelFlinkParameters.RunModeEnum.RUN.getCommand() : seatunnelParameters.getRunMode().getCommand()); 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 (StringUtils.isNotBlank(seatunnelParameters.getOthers())) { if (StringUtils.isNotBlank(seatunnelParameters.getOthers())) {
args.add(seatunnelParameters.getOthers()); args.add(seatunnelParameters.getOthers());
} }

4
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-sea-tunnel.ts

@ -180,6 +180,10 @@ export const STARTUP_SCRIPT = [
] ]
export const FLINK_RUN_MODE = [ export const FLINK_RUN_MODE = [
{
label: 'none',
value: 'NONE'
},
{ {
label: 'run', label: 'run',
value: 'RUN' value: 'RUN'

Loading…
Cancel
Save