Unverified Commit 8bd0bf03 authored by ZackYoung's avatar ZackYoung Committed by GitHub

[Bug][App] Fix app start 2 (#2813)

* fix_app_start * fix_app_start * fix_app_start
parent 06d7b469
...@@ -48,6 +48,7 @@ import org.apache.commons.io.FileUtils; ...@@ -48,6 +48,7 @@ import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.flink.configuration.PipelineOptions; import org.apache.flink.configuration.PipelineOptions;
import org.apache.flink.python.PythonOptions; import org.apache.flink.python.PythonOptions;
import org.apache.flink.streaming.api.graph.StreamGraph;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
...@@ -252,7 +253,9 @@ public class Submitter { ...@@ -252,7 +253,9 @@ public class Submitter {
String sqlStatement = executor.pretreatStatement(statements[i]); String sqlStatement = executor.pretreatStatement(statements[i]);
if (ExecuteJarParseStrategy.INSTANCE.match(sqlStatement)) { if (ExecuteJarParseStrategy.INSTANCE.match(sqlStatement)) {
ExecuteJarOperation executeJarOperation = new ExecuteJarOperation(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; break;
} else if (Operations.getOperationType(sqlStatement) == SqlType.ADD) { } else if (Operations.getOperationType(sqlStatement) == SqlType.ADD) {
File[] info = AddJarSqlParseStrategy.getInfo(sqlStatement); File[] info = AddJarSqlParseStrategy.getInfo(sqlStatement);
......
...@@ -60,7 +60,7 @@ public class ExecuteJarOperation extends AbstractOperation implements ExtendOper ...@@ -60,7 +60,7 @@ public class ExecuteJarOperation extends AbstractOperation implements ExtendOper
return Optional.of(TABLE_RESULT_OK); return Optional.of(TABLE_RESULT_OK);
} }
protected StreamGraph getStreamGraph(CustomTableEnvironment tEnv) { public StreamGraph getStreamGraph(CustomTableEnvironment tEnv) {
JarSubmitParam submitParam = JarSubmitParam.build(statement); JarSubmitParam submitParam = JarSubmitParam.build(statement);
return getStreamGraph(submitParam, tEnv); return getStreamGraph(submitParam, tEnv);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment