smengcl commented on code in PR #8957:
URL: https://github.com/apache/hadoop/pull/8957#discussion_r4500042467
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/TableMapping.java:
##########
@@ -124,6 +125,14 @@ private Map<String, String> load() {
return loadMap;
}
+ /**
+ * Rewrite an IP literal to the form {@link NetUtils#normalizeHostName}
gives lookups,
+ * e.g. 2001:db8::10 to 2001:db8:0:0:0:0:0:10. Other keys are kept as
written.
+ */
+ private static String normalizeIpLiteral(String key) {
+ return InetAddresses.isInetAddress(key) ?
InetAddresses.forString(key).getHostAddress() : key;
Review Comment:
Good catch, reproduced. `normalizeIpLiteral` now keeps the key as written
when `forString` throws, so only that entry stays unnormalized, and
`testResolveIPv6` adds `fe80::1%hadoop-no-such-interface` and checks the other
entries still resolve.
_🤖 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]