From 8fa90c2d8f970710d6429759ebd10975992f144f Mon Sep 17 00:00:00 2001 From: shenyun Date: Sun, 5 Feb 2023 20:37:56 +0800 Subject: [PATCH] feature flinksql support standalone deploy mode (#13495) --- .../dolphinscheduler/plugin/task/flink/FlinkArgsUtils.java | 7 +++++++ .../plugin/task/flink/FlinkDeployMode.java | 4 +++- .../projects/task/components/node/fields/use-flink.ts | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkArgsUtils.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkArgsUtils.java index 7112d0e9e7..45b10c4128 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkArgsUtils.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkArgsUtils.java @@ -129,6 +129,8 @@ public class FlinkArgsUtils { if (FlinkDeployMode.LOCAL == deployMode) { // execution.target initOptions.add(String.format(FlinkConstants.FLINK_FORMAT_EXECUTION_TARGET, FlinkConstants.FLINK_LOCAL)); + } else if (FlinkDeployMode.STANDALONE == deployMode) { + // standalone exec } else { // execution.target initOptions.add( @@ -209,6 +211,9 @@ public class FlinkArgsUtils { case LOCAL: args.add(FlinkConstants.FLINK_RUN); // run break; + case STANDALONE: + args.add(FlinkConstants.FLINK_RUN); // run + break; } String others = flinkParameters.getOthers(); @@ -259,6 +264,8 @@ public class FlinkArgsUtils { break; case LOCAL: break; + case STANDALONE: + break; } int parallelism = flinkParameters.getParallelism(); diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkDeployMode.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkDeployMode.java index b02cd40f92..b622fde2aa 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkDeployMode.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkDeployMode.java @@ -28,5 +28,7 @@ public enum FlinkDeployMode { @JsonProperty("cluster") CLUSTER, @JsonProperty("application") - APPLICATION + APPLICATION, + @JsonProperty("standalone") + STANDALONE } diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-flink.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-flink.ts index d987d5ff56..f47e884716 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-flink.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-flink.ts @@ -53,6 +53,10 @@ export function useFlink(model: { [field: string]: any }): IJsonItem[] { { label: 'local', value: 'local' + }, + { + label: 'standalone', + value: 'standalone' } ] }