smengcl commented on code in PR #8981:
URL: https://github.com/apache/hadoop/pull/8981#discussion_r4560199158


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxy.java:
##########
@@ -69,8 +70,7 @@ protected void serviceInit(Configuration conf) throws 
Exception {
           " of " + auth);
     }
     String proxy = WebAppUtils.getProxyHostAndPort(conf);
-    String[] proxyParts = proxy.split(":");
-    proxyHost = proxyParts[0];
+    proxyHost = HostAndPort.fromString(proxy).getHost();

Review Comment:
   Done in 61bf597d80f: `serviceInit` now parses the bind address with 
`HostAndPort` (port 0 when absent, as before), the endpoint and 
`getBindAddress()` use `NetUtils.getHostPortString`, and 
`TestWebAppProxyServer#testIPv6ProxyAddress` checks the parsed address and 
starts the proxy with an IPv6 `PROXY_ADDRESS`.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to