You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Eli Collins (JIRA)" <ji...@apache.org> on 2011/06/24 00:34:48 UTC

[jira] [Commented] (HADOOP-6682) NetUtils:normalizeHostName does not process hostnames starting with [a-f] correctly

    [ https://issues.apache.org/jira/browse/HADOOP-6682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13054146#comment-13054146 ] 

Eli Collins commented on HADOOP-6682:
-------------------------------------

The Y20 patch here is bogus btw it changes from 10 to 16 instead of vice versa. Doesn't look like it was applied anywhere so not a big deal.

> NetUtils:normalizeHostName does not process hostnames starting with [a-f] correctly
> -----------------------------------------------------------------------------------
>
>                 Key: HADOOP-6682
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6682
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io
>            Reporter: Jakob Homan
>            Assignee: Jakob Homan
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6682-Y20.patch, HADOOP-6682.patch
>
>
>   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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira