smengcl opened a new pull request, #8964: URL: https://github.com/apache/hadoop/pull/8964
Generated-by: Claude Code (Opus 5.5) JIRA: https://issues.apache.org/jira/browse/YARN-12034 ### Description of PR `WebAppUtils.getResolvedAddress`, the `RMWebAppFilter` retry URL, and `RMWebApp.buildRedirectPath` (standby RM redirect) build `host + ":" + port`. With an IPv6 RM web address such as `[2001:db8::1]:8088`, this gives `2001:db8::1:8088` and `http://2001:db8::1:8088/...`, which cannot be parsed back into a host and port. This patch builds those strings with `NetUtils.getHostPortString` (HADOOP-19958), which brackets IPv6 literals. Hostname and IPv4 output is unchanged. Callers of `getResolvedAddress` (RM web app URLs, web proxy and AM filter URI bases, the timeline collector address) now get a valid `[IPv6]:port`, matching the format `SecurityUtil.buildTokenService` already uses. ### How was this patch tested? New unit tests in existing classes, each with an IPv4 and an IPv6 case: - `TestWebAppUtils#testGetResolvedAddress` - `TestRMWebApp#testStandbyRefreshUrl` (standby RM with no active RM, checks the `Refresh` header URL) Both fail on trunk without the fix (`2001:db8::1:8088`, `http://2001:db8::1:8088/cluster/apps?...`) and pass with it. `TestWebAppUtils`, `TestRMWebApp` and `TestRMWebAppFairScheduler` pass locally. ### For code changes: - [x] Does the title of this PR start with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? ### AI Tooling - [x] The PR includes the phrase "Contains content generated by Claude Code". - [x] My use of AI contributions follows the ASF legal policy https://www.apache.org/legal/generative-tooling.html Contains content generated by Claude Code. 🤖 Generated with [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]
