Skip to content

Commit

Permalink
[Bug][App] Fix app start 2 (DataLinkDC#2813)
Browse files Browse the repository at this point in the history
* fix_app_start

* fix_app_start

* fix_app_start
  • Loading branch information
zackyoungh authored Dec 27, 2023
1 parent 06d7b46 commit 8bd0bf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.flink.configuration.PipelineOptions;
import org.apache.flink.python.PythonOptions;
import org.apache.flink.streaming.api.graph.StreamGraph;

import java.io.File;
import java.io.FileOutputStream;
Expand Down Expand Up @@ -252,7 +253,9 @@ public static void executeJarJob(String type, Executor executor, String[] statem
String sqlStatement = executor.pretreatStatement(statements[i]);
if (ExecuteJarParseStrategy.INSTANCE.match(sqlStatement)) {
ExecuteJarOperation executeJarOperation = new ExecuteJarOperation(sqlStatement);
executeJarOperation.execute(executor.getCustomTableEnvironment());
StreamGraph streamGraph = executeJarOperation.getStreamGraph(executor.getCustomTableEnvironment());
streamGraph.setJobName(executor.getExecutorConfig().getJobName());
executor.getStreamExecutionEnvironment().executeAsync(streamGraph);
break;
} else if (Operations.getOperationType(sqlStatement) == SqlType.ADD) {
File[] info = AddJarSqlParseStrategy.getInfo(sqlStatement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public Optional<? extends TableResult> execute(CustomTableEnvironment tEnv) {
return Optional.of(TABLE_RESULT_OK);
}

protected StreamGraph getStreamGraph(CustomTableEnvironment tEnv) {
public StreamGraph getStreamGraph(CustomTableEnvironment tEnv) {
JarSubmitParam submitParam = JarSubmitParam.build(statement);
return getStreamGraph(submitParam, tEnv);
}
Expand Down

0 comments on commit 8bd0bf0

Please sign in to comment.