kl0u commented on a change in pull request #10313: [FLINK-14840] Use Executor
interface in SQL cli
URL: https://github.com/apache/flink/pull/10313#discussion_r350360469
##########
File path:
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/LocalExecutor.java
##########
@@ -467,26 +468,27 @@ public void stop(SessionContext session) {
// create job graph with dependencies
final String jobName = context.getSessionContext().getName() +
": " + statement;
- final JobGraph jobGraph;
+ final Pipeline pipeline;
try {
- jobGraph = envInst.createJobGraph(jobName);
+ pipeline = envInst.createPipeline(jobName,
context.getFlinkConfig());
} catch (Throwable t) {
// catch everything such that the statement does not
crash the executor
throw new SqlExecutionException("Invalid SQL
statement.", t);
}
// create execution
- final BasicResult<C> result = new BasicResult<>();
final ProgramDeployer<C> deployer = new ProgramDeployer<>(
- context, jobName, jobGraph, result, false);
+ context, jobName, pipeline, false);
// blocking deployment
- deployer.run();
+ JobClient jobClient;
+ try {
+ jobClient = deployer.run().get();
Review comment:
Here we do not `close` the client.
----------------------------------------------------------------
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]
With regards,
Apache Git Services