Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/1202#discussion_r41167117 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/JobManagerArchiveRetriever.java --- @@ -70,28 +104,68 @@ public ActorGateway getArchiveGateway() { return archiveGateway; } + /** + * Returns the current redirect address or <code>null</code> if the job manager associated with + * this web monitor is leading. In that case, work with the gateway directly. + */ + public String getRedirectAddress() { + return redirectWebMonitorAddress; + } @Override public void notifyLeaderAddress(String leaderAddress, UUID leaderSessionID) { if (leaderAddress != null && !leaderAddress.equals("")) { try { - ActorRef jobManager = AkkaUtils.getActorRef( - leaderAddress, - actorSystem, + ActorRef jobManager = AkkaUtils.getActorRef(leaderAddress, actorSystem, --- End diff -- This is a blocking call which will block the `NodeCache's` thread which calls the `NodeCacheListener`. This should be avoided by using `AkkaUtils.getActorRefFuture` and a `Promise`.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---