[
https://issues.apache.org/jira/browse/FLINK-8344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330825#comment-16330825
]
ASF GitHub Bot commented on FLINK-8344:
---------------------------------------
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()`
> Add support for HA to RestClusterClient
> ---------------------------------------
>
> Key: FLINK-8344
> URL: https://issues.apache.org/jira/browse/FLINK-8344
> Project: Flink
> Issue Type: Improvement
> Components: Client
> Affects Versions: 1.5.0
> Reporter: Till Rohrmann
> Assignee: Gary Yao
> Priority: Major
> Labels: flip-6
> Fix For: 1.5.0
>
>
> The {{RestClusterClient}} must be able to deal with changing JobMasters in
> case of HA. We have to add functionality to reconnect to a newly elected
> leader in case of HA.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)