Description
public static String normalizeHostName(String name) {
if (Character.digit(name.charAt(0), 16) != -1) {
return name;
This code is attempting to short-circuit the hostname->ip resolution on the assumption that if name starts with a digit, it's already an ip address. This is of questionable value, but because it checks for a hex digit, it will fail on names starting with [a-f]. Such names will not be converted to an ip address, but be returned unchanged.
Attachments
Attachments
Issue Links
- relates to
-
HADOOP-6824 Improve NetUtils:normalizeHostName
- Open