Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-4093

Improve RM WebApp start up when proxy address is not set

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha, 3.0.0
    • Fix Version/s: 2.0.0-alpha, 3.0.0
    • Component/s: mrv2
    • Labels:
      None

      Description

      ResourceManager.java
        protected void startWepApp() {
          Builder<ApplicationMasterService> builder = 
            WebApps.$for("cluster", ApplicationMasterService.class, masterService, "ws").at(
                this.conf.get(YarnConfiguration.RM_WEBAPP_ADDRESS,
                YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS)); 
          if(YarnConfiguration.getRMWebAppHostAndPort(conf).
              equals(YarnConfiguration.getProxyHostAndPort(conf))) {
            AppReportFetcher fetcher = new AppReportFetcher(conf, getClientRMService());
            builder.withServlet(ProxyUriUtils.PROXY_SERVLET_NAME, 
                ProxyUriUtils.PROXY_PATH_SPEC, WebAppProxyServlet.class);
            builder.withAttribute(WebAppProxy.FETCHER_ATTRIBUTE, fetcher);
            String proxy = YarnConfiguration.getProxyHostAndPort(conf);
            String[] proxyParts = proxy.split(":");
            builder.withAttribute(WebAppProxy.PROXY_HOST_ATTRIBUTE, proxyParts[0]);
      
          }
          webApp = builder.start(new RMWebApp(this));
        }
      

      In the above code, YarnConfiguration.getProxyHostAndPort(conf) is invoking twice. getProxyHostAndPort() internally invokes getRMWebAppHostAndPort() which resolves RM web app address when proxy address is not set.

        Activity

          People

          • Assignee:
            Devaraj K
            Reporter:
            Devaraj K
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development