[ https://issues.apache.org/jira/browse/FLINK-2793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14945117#comment-14945117 ]
ASF GitHub Bot commented on FLINK-2793: --------------------------------------- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/1202#discussion_r41272107 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/JobManagerArchiveRetriever.java --- @@ -47,51 +60,160 @@ private final FiniteDuration timeout; private final WebMonitor webMonitor; + /** Pattern to extract the host from an remote Akka URL */ + private final Pattern hostFromLeaderAddressPattern = Pattern.compile("^.+@(.+):([0-9]+)/user/.+$"); + + /** The JobManager Akka URL associated with this JobManager */ + private volatile String jobManagerAkkaUrl; + /** will be written and read concurrently */ private volatile ActorGateway jobManagerGateway; private volatile ActorGateway archiveGateway; + private volatile String redirectWebMonitorAddress; public JobManagerArchiveRetriever( WebMonitor webMonitor, ActorSystem actorSystem, FiniteDuration lookupTimeout, FiniteDuration timeout) { - this.webMonitor = webMonitor; - this.actorSystem = actorSystem; - this.lookupTimeout = lookupTimeout; - this.timeout = timeout; + + this.webMonitor = checkNotNull(webMonitor); + this.actorSystem = checkNotNull(actorSystem); + this.lookupTimeout = checkNotNull(lookupTimeout); + this.timeout = checkNotNull(timeout); + } + + /** + * Associates this instance with the job manager identified by the given URL. + * + * <p>This has to match the URL retrieved by the leader retrieval service. In tests setups you + * have to make sure to use the correct type of URLs. + */ + public void setJobManagerAkkaUrlAndRetrieveGateway(String jobManagerAkkaUrl) throws Exception { --- End diff -- Actually, I meant to get rid of this extra redirect logic here. > Redirect to leading JobManager web fronted in non-standalone mode > ----------------------------------------------------------------- > > Key: FLINK-2793 > URL: https://issues.apache.org/jira/browse/FLINK-2793 > Project: Flink > Issue Type: Improvement > Components: JobManager > Affects Versions: 1.0 > Reporter: Ufuk Celebi > Assignee: Ufuk Celebi > > In case of a non-standalone recovery mode, the job manager frontend of > non-leading job managers prints the job manager information of its associated > job manager. Because the job manager is not leading, nothing shows up. > The web frontend cannot directly communicate with the leading job manager, > because many job manager structures like the execution graph are not > serializable. > A work around is to redirect to the web frontend of the leading job manager. > This makes sure that all interesting information is presented. -- This message was sent by Atlassian JIRA (v6.3.4#6332)