fsk119 commented on a change in pull request #14962:
URL: https://github.com/apache/flink/pull/14962#discussion_r587244098
##########
File path:
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/ExecutionContext.java
##########
@@ -751,17 +751,28 @@ private void initializeCatalogs() {
}
private StreamExecutionEnvironment createStreamExecutionEnvironment() {
- final StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment();
+ // We need not different StreamExecutionEnvironments to build and
submit flink job,
+ // instead we just use
StreamExecutionEnvironment#executeAsync(StreamGraph) method
+ // to execute existing StreamGraph.
+ // This requires StreamExecutionEnvironment to have a full flink
configuration.
+ final StreamExecutionEnvironment env =
+ new StreamExecutionEnvironment(new Configuration(flinkConfig),
classLoader);
Review comment:
After discussion with Jark offline, currently it's not able to use the
`StreamExecutionEnvironment.getExecutionEnvironment(flinkConfig)` to build the
`StreamExecutionEnvironment`. Because it doesn't allow us to use the
user-defined classloader to build the expected `StreamExecutionEnvironment`.
In my local testing, the used way doesn't have problems(standalone).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]