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

Karthik Kambatla commented on YARN-1811:
----------------------------------------

Thanks Robert.

Comments:
# WebAppUtils#getProxyHostsAndPortsForAmFilter is a little dense for my liking. 
We should probably add comments for the various ifs and fors :)
# Nit: Okay with not fixing it. I find using Joiner more readable. 
{code}
    StringBuilder sb = new StringBuilder();
    for (String proxy : proxies) {
      sb.append(proxy.split(":")[0]).append(AmIpFilter.PROXY_HOSTS_DELIMITER);
    }
    sb.setLength(sb.length() - 1);
{code}
# AmIpFilter has a couple of public fields we are removing. We can leave them 
there for compatibility sake (in theory) and may be deprecate them as well. If 
others involved think okay, we should probably just make AmIpFilter @Private. 
# AmIpFilter#findRedirectUrl - we could use a Map<String (host:port), 
proxyUriBase>, so we don't need the following for loop.
{code}
      for (String proxyUriBase : proxyUriBases) {
        try {
          URL url = new URL(proxyUriBase);
          if (host.equals(url.getHost() + ":" + url.getPort())) {
            addr = proxyUriBase;
            break;
          }
        } catch(MalformedURLException e) {
          // ignore
        }
      }
{code}
# Also, we should at least log the MalformedURLException above and not add to 
the map. 

> RM HA: AM link broken if the AM is on nodes other than RM
> ---------------------------------------------------------
>
>                 Key: YARN-1811
>                 URL: https://issues.apache.org/jira/browse/YARN-1811
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.3.0
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>         Attachments: YARN-1811.patch, YARN-1811.patch, YARN-1811.patch
>
>
> When using RM HA, if you click on the "Application Master" link in the RM web 
> UI while the job is running, you get an Error 500:



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to