Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-4093

Improve RM WebApp start up when proxy address is not set

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-alpha, 3.0.0-alpha1
    • 2.0.0-alpha
    • mrv2
    • 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.

      Attachments

        1. MAPREDUCE-4093.patch
          2 kB
          Devaraj Kavali

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            devaraj Devaraj Kavali
            devaraj Devaraj Kavali
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment