kl0u commented on a change in pull request #9972: [FLINK-14496][client] Exclude 
detach flag from ClusterClient
URL: https://github.com/apache/flink/pull/9972#discussion_r341102998
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamContextEnvironment.java
 ##########
 @@ -57,9 +58,12 @@ public JobExecutionResult execute(StreamGraph streamGraph) 
throws Exception {
                // running from the CLI will override the savepoint restore 
settings
                
jobGraph.setSavepointRestoreSettings(ctx.getSavepointRestoreSettings());
 
-               JobExecutionResult jobExecutionResult =  ctx.getClient()
-                       .submitJob(jobGraph, ctx.getUserCodeClassLoader())
-                       .getJobExecutionResult();
+               JobExecutionResult jobExecutionResult;
+               if (ctx.isDetached()) {
+                       jobExecutionResult = new 
DetachedJobExecutionResult(ClientUtils.submitJob(ctx.getClient(), 
jobGraph).getJobID());
 
 Review comment:
   You do not need to re-wrap it in a `DetachedJobExecutionResult`.

----------------------------------------------------------------
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

Reply via email to