dmvk commented on a change in pull request #16881:
URL: https://github.com/apache/flink/pull/16881#discussion_r694955631



##########
File path: 
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
##########
@@ -372,13 +373,34 @@ public void close() {
 
         final CompletableFuture<JobSubmitResponseBody> submissionFuture =
                 requestFuture.thenCompose(
-                        requestAndFileUploads ->
-                                sendRetriableRequest(
-                                        JobSubmitHeaders.getInstance(),
-                                        EmptyMessageParameters.getInstance(),
-                                        requestAndFileUploads.f0,
-                                        requestAndFileUploads.f1,
-                                        
isConnectionProblemOrServiceUnavailable()));
+                        requestAndFileUploads -> {
+                            LOG.info(
+                                    "Submitting job '{}' ({}).",
+                                    jobGraph.getName(),
+                                    jobGraph.getJobID());
+                            return sendRetriableRequest(
+                                    JobSubmitHeaders.getInstance(),
+                                    EmptyMessageParameters.getInstance(),
+                                    requestAndFileUploads.f0,
+                                    requestAndFileUploads.f1,
+                                    isConnectionProblemOrServiceUnavailable(),
+                                    (receiver, error) -> {
+                                        if (error != null) {
+                                            LOG.warn(
+                                                    "Unable to submit job '{}' 
({}) to {}.",

Review comment:
       Fixed. Please take another look ;) I'm not super happy with the 
solution, but doing this cleaner would require changing contract of retry 
methods in FutureUtils, to gain access to current state of retry policy.




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