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

ASF GitHub Bot commented on YARN-11154:
---------------------------------------

slfan1989 commented on code in PR #5946:
URL: https://github.com/apache/hadoop/pull/5946#discussion_r1292594570


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/Router.java:
##########
@@ -209,9 +215,30 @@ public void startWepApp() {
 
     Builder<Object> builder =
         WebApps.$for("cluster", null, null, "ws").with(conf).at(webAppAddress);
+    if(conf.getBoolean(YarnConfiguration.ROUTER_WEBAPP_PROXY_ENABLE,
+        YarnConfiguration.DEFAULT_ROUTER_WEBAPP_PROXY_ENABLE)) {
+      fetcher = new FedAppReportFetcher(conf);
+      builder.withServlet(ProxyUriUtils.PROXY_SERVLET_NAME, 
ProxyUriUtils.PROXY_PATH_SPEC,
+          WebAppProxyServlet.class);
+      builder.withAttribute(WebAppProxy.FETCHER_ATTRIBUTE, fetcher);
+      String proxyHostAndPort = getProxyHostAndPort(conf);
+      String[] proxyParts = proxyHostAndPort.split(":");
+      builder.withAttribute(WebAppProxy.PROXY_HOST_ATTRIBUTE, proxyParts[0]);
+    }
     webApp = builder.start(new RouterWebApp(this));
   }
 
+  public static String getProxyHostAndPort(Configuration conf) {
+    String addr = conf.get(YarnConfiguration.PROXY_ADDRESS);

Review Comment:
   Do we need a default value?





> Make router support proxy server.
> ---------------------------------
>
>                 Key: YARN-11154
>                 URL: https://issues.apache.org/jira/browse/YARN-11154
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: yarn
>    Affects Versions: 3.2.1
>            Reporter: zhengchenyu
>            Assignee: zhengchenyu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>         Attachments: YARN-11154.draft.patch
>
>
> Detail message see: https://issues.apache.org/jira/browse/YARN-10775 and 
> YARN-10775-design-doc.001.pdf 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to