Browse Source

[Bug] [Seatunnel-Task] Run Mode defaults to run, and you cannot select a null value (#14267)

Co-authored-by: zhang <zhangyfcoder@163.com>
3.2.1-prepare
zyfjrx 1 year ago committed by GitHub
parent
commit
4111acb58e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/flink/SeatunnelFlinkParameters.java
  2. 10
      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
public enum RunModeEnum {
NONE("none"),
RUN("--run-mode run"),
RUN_APPLICATION("--run-mode run-application");

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

@ -44,9 +44,13 @@ public class SeatunnelFlinkTask extends SeatunnelTask {
@Override
public List<String> buildOptions() throws Exception {
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())) {
args.add(seatunnelParameters.getOthers());
}

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

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

Loading…
Cancel
Save