[
https://issues.apache.org/jira/browse/FLINK-8344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330812#comment-16330812
]
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_r162413303
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java ---
@@ -251,6 +245,12 @@ protected void channelRead0(ChannelHandlerContext ctx,
Object msg) {
ctx.close();
}
+ @Override
+ public void exceptionCaught(final ChannelHandlerContext ctx,
final Throwable cause) throws Exception {
+ jsonFuture.completeExceptionally(cause);
--- End diff --
Without this, the `CliFrontend` can block indefintely for some operations.
For example:
```
CompletableFuture<Collection<JobStatusMessage>> jobDetailsFuture =
clusterClient.listJobs();
logAndSysout("Waiting for response...");
jobDetails = jobDetailsFuture.get();
```
This way, the exception gets propagated to the client.
> 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)