smengcl opened a new pull request, #8852:
URL: https://github.com/apache/hadoop/pull/8852
Generated-by: Claude Code (Opus 5.5)
### Description of PR
`DatanodeManager#getDnDescriptorsFromIpAddr` took the host from a slow peer
key with `split(":")[0]`. For an IPv6 info address such as `2001:db8::1:9864`
or `[2001:db8::1]:9864` that yields `2001` or `[2001`, so the DataNode was
never found and slow node exclusion did nothing on IPv6 clusters.
The host is now everything before the last `:`, with surrounding brackets
removed. IPv4 and hostname keys parse the same as before.
### How was this patch tested?
Added `TestDatanodeManager#testSlowPeersResolvedForIpv4AndIpv6`, which
registers IPv4 and IPv6 DataNodes, reports them as slow peers using plain IPv4,
plain IPv6 and bracketed IPv6 info addresses, and checks that
`getAllSlowDataNodes` returns all three. It fails without the fix.
`TestReplicationPolicyExcludeSlowNodes` still passes.
### For code changes:
- [x] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
🤖 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]