Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5312#discussion_r162416324
  
    --- Diff: 
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
 ---
    @@ -327,13 +376,14 @@ public T getClusterId() {
        }
     
        private <R, A extends AsynchronouslyCreatedResource<R>> R 
waitForResource(
    -                   final SupplierWithException<CompletableFuture<A>, 
IOException> resourceFutureSupplier)
    +                   final Supplier<CompletableFuture<A>> 
resourceFutureSupplier)
                                throws IOException, InterruptedException, 
ExecutionException, TimeoutException {
                A asynchronouslyCreatedResource;
                long attempt = 0;
                while (true) {
                        final CompletableFuture<A> responseFuture = 
resourceFutureSupplier.get();
    --- End diff --
    
    Currently the supplied future in `resourceFutureSupplier` will be retried 
with `FutureUtils` but the retry could also simply move into the `while(true)` 
loop. However, this would not work well if we wanted to retry other operations 
such as list jobs because the method returns a `CompletableFuture`:
    `CompletableFuture<Collection<JobStatusMessage>> listJobs()`



---

Reply via email to