TisonKun commented on a change in pull request #10434: [FLINK-15072][client]
executeAsync in ContextEnvironment from CliFrontend cause unexpected exception
URL: https://github.com/apache/flink/pull/10434#discussion_r356634149
##########
File path:
flink-clients/src/main/java/org/apache/flink/client/program/ContextEnvironment.java
##########
@@ -91,25 +82,27 @@ public JobExecutionResult execute(String jobName) throws
Exception {
}
jobExecutionResult = jobExecutionResultFuture.get();
+ jobExecutionResult.printResult();
} else {
jobExecutionResult = new
DetachedJobExecutionResult(jobClient.getJobID());
}
- setJobExecutionResult(jobExecutionResult);
return jobExecutionResult;
}
- private void verifyExecuteIsCalledOnceWhenInDetachedMode() {
+ @Override
+ public JobClient executeAsync(String jobName) throws Exception {
+ verifyExecuteIsCalledOnceWhenInDetachedMode();
+ return super.executeAsync(jobName);
+ }
+
+ public void verifyExecuteIsCalledOnceWhenInDetachedMode() {
Review comment:
I agree and can open a ticket for this, even add a tiny commit on this
thread. However, I'm a bit unclear about your idea as comment below.
----------------------------------------------------------------
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