[
https://issues.apache.org/jira/browse/YARN-11154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17753664#comment-17753664
]
ASF GitHub Bot commented on YARN-11154:
---------------------------------------
zhengchenyu commented on code in PR #5946:
URL: https://github.com/apache/hadoop/pull/5946#discussion_r1292685883
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/clientrm/RouterClientRMService.java:
##########
@@ -623,4 +650,22 @@ public void initUserPipelineMap(Configuration conf) {
YarnConfiguration.DEFAULT_ROUTER_PIPELINE_CACHE_MAX_SIZE);
this.userPipelineMap = Collections.synchronizedMap(new
LRUCacheHashMap<>(maxCacheSize, true));
}
+
+ private URL getRedirectURL() throws Exception {
+ Configuration conf = getConfig();
+ String webAppAddress = WebAppUtils.getWebAppBindURL(conf,
YarnConfiguration.ROUTER_BIND_HOST,
+ WebAppUtils.getRouterWebAppURLWithoutScheme(conf));
+ String[] hostPort = StringUtils.split(webAppAddress, ':');
+ if (hostPort.length != 2) {
+ throw new YarnRuntimeException("Router can't get valid redirect proxy
url");
+ }
+ String host;
+ if (null == hostPort[0] || hostPort[0].equals("") ||
hostPort[0].equals("0.0.0.0")) {
Review Comment:
refactor `null == hostPort[0] || hostPort[0].equals("")` to
`StringUtils.isNotBlank(hostPort[0])`.
Is it ok?
> 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: [email protected]
For additional commands, e-mail: [email protected]