davidradl commented on code in PR #24754:
URL: https://github.com/apache/flink/pull/24754#discussion_r1609843669


##########
flink-clients/src/main/java/org/apache/flink/client/deployment/executors/AbstractSessionClusterExecutor.java:
##########
@@ -97,7 +117,26 @@ public CompletableFuture<JobClient> execute(
                                                     clusterClientProvider,
                                                     jobID,
                                                     userCodeClassloader))
-                    .whenCompleteAsync((ignored1, ignored2) -> 
clusterClient.close());
+                    .whenCompleteAsync(
+                            (jobClient, throwable) -> {
+                                if (throwable == null) {
+                                    RuntimeExecutionMode executionMode =
+                                            jobGraph.getJobConfiguration()
+                                                    
.get(ExecutionOptions.RUNTIME_MODE);
+                                    if (jobStatusChangedListeners.size() > 0) {
+                                        jobStatusChangedListeners.forEach(
+                                                listener ->
+                                                        listener.onEvent(
+                                                                new 
DefaultJobCreatedEvent(
+                                                                        
jobGraph.getJobID(),
+                                                                        
jobGraph.getName(),
+                                                                        
((StreamGraph) pipeline)
+                                                                               
 .getLineageGraph(),
+                                                                        
executionMode)));
+                                    }
+                                }
+                                clusterClient.close();

Review Comment:
   I see this conversation is resolved - but I did not see an answer to what 
looks like a valid concern 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to