flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2793) Redirect to leading JobManager web fronted in non-standalone mode
Date Tue, 06 Oct 2015 14:39:27 GMT

    [ https://issues.apache.org/jira/browse/FLINK-2793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14945122#comment-14945122
] 

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_r41272295
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/RuntimeMonitorHandler.java
---
    @@ -44,27 +47,40 @@
     public class RuntimeMonitorHandler extends SimpleChannelInboundHandler<Routed>
{
     	
     	private static final Charset ENCODING = Charset.forName("UTF-8");
    +
    +	private final JobManagerArchiveRetriever retriever;
     	
     	private final RequestHandler handler;
     	
     	private final String contentType;
     	
    -	public RuntimeMonitorHandler(RequestHandler handler) {
    -		if (handler == null) {
    -			throw new NullPointerException();
    -		}
    -		this.handler = handler;
    +	public RuntimeMonitorHandler(RequestHandler handler, JobManagerArchiveRetriever retriever)
{
    +		this.retriever = checkNotNull(retriever);
    +		this.handler = checkNotNull(handler);
     		this.contentType = (handler instanceof RequestHandler.JsonResponse) ? "application/json"
: "text/plain";
     	}
     	
     	@Override
     	protected void channelRead0(ChannelHandlerContext ctx, Routed routed) throws Exception
{
    +		// Redirect to leader if necessary
    +		String redirectAddress = retriever.getRedirectAddress();
    --- End diff --
    
    Get rid of this `getRedirectAddress` method here and simply ask for the current leader.
Then compare the leader address with the local job manager address to decide whether you have
to redirect or not.


> 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)

Mime
View raw message