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 "Junping Du (JIRA)" <ji...@apache.org> on 2012/05/09 13:57:53 UTC

[jira] [Created] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Junping Du created HADOOP-8372:
----------------------------------

             Summary: normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
                 Key: HADOOP-8372
                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
             Project: Hadoop Common
          Issue Type: Bug
          Components: io, util
    Affects Versions: 0.23.0, 1.0.0
            Reporter: Junping Du
            Assignee: Junping Du


A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271442#comment-13271442 ] 

Hadoop QA commented on HADOOP-8372:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12526152/HADOOP-8372.patch
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 1 new or modified test files.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 eclipse:eclipse.  The patch built with eclipse:eclipse.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    -1 core tests.  The patch failed these unit tests in hadoop-common-project/hadoop-common:

                  org.apache.hadoop.fs.viewfs.TestViewFsTrash
                  org.apache.hadoop.net.TestTableMapping

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/964//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/964//console

This message is automatically generated.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271604#comment-13271604 ] 

Junping Du commented on HADOOP-8372:
------------------------------------

Hi Suresh, That's very nicely suggestions. Will update patch soon.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273227#comment-13273227 ] 

Hudson commented on HADOOP-8372:
--------------------------------

Integrated in Hadoop-Hdfs-trunk #1040 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1040/])
    HADOOP-8372. NetUtils.normalizeHostName() incorrectly handles hostname starting with a numeric character. Contributed by Junping Du. (Revision 1336446)

     Result = FAILURE
suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1336446
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java

                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 2.0.0, 3.0.0
>
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Junping Du updated HADOOP-8372:
-------------------------------

    Attachment: HADOOP-8372-v2.patch
    
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271640#comment-13271640 ] 

Junping Du commented on HADOOP-8372:
------------------------------------

Sorry. Just forget to address the indent issue. Here is the latest code.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271540#comment-13271540 ] 

Suresh Srinivas commented on HADOOP-8372:
-----------------------------------------

I was concerned about performance implication of this change. However, in sun jdk, IPAddressUtil#isIPv4LiteralAddress() is called, which is doing more complete check for ip address before doing a look up.

Please fix the tests. While at it, please indent the the code in the test correctly. Also, optionaly, you reduce a line by {{ return InetAddress.getByName(name).getHostAddress(); }}
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271594#comment-13271594 ] 

Suresh Srinivas commented on HADOOP-8372:
-----------------------------------------

bq. This could become an issue. But we could fix it later.
By this, I mean, if resolving the address using DNS fails for some reason, we could fix the test. So the code that you have added seems fine to me.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271632#comment-13271632 ] 

Suresh Srinivas commented on HADOOP-8372:
-----------------------------------------

Junping, the patch looks good. Could you please remove the TODO comment. Also can you please use two spaces for indenting instead of tab in the tests.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271910#comment-13271910 ] 

Hadoop QA commented on HADOOP-8372:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12526226/HADOOP-8372.patch
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 2 new or modified test files.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 eclipse:eclipse.  The patch built with eclipse:eclipse.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed unit tests in hadoop-common-project/hadoop-common.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/971//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/971//console

This message is automatically generated.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Kihwal Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271482#comment-13271482 ] 

Kihwal Lee commented on HADOOP-8372:
------------------------------------

{noformat}
A host name (label) MUST NOT consist of all numeric values.
{noformat}

They are invalid host names, so the tests need to be fixed. I suggest you keep the patch as is and fix the broken tests.

If a user puts an invalid host name in config, it will fail eventually. If this method were to return the string as is in such cases, it would get "translated" the same way somewhere down the road. We could add a full validation and make it blow up in this method, but I don't think the gain is worth the complexity of the check.

                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271941#comment-13271941 ] 

Hudson commented on HADOOP-8372:
--------------------------------

Integrated in Hadoop-Common-trunk-Commit #2215 (See [https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2215/])
    HADOOP-8372. NetUtils.normalizeHostName() incorrectly handles hostname starting with a numeric character. Contributed by Junping Du. (Revision 1336446)

     Result = SUCCESS
suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1336446
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java

                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 2.0.0, 3.0.0
>
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271680#comment-13271680 ] 

Hadoop QA commented on HADOOP-8372:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12526188/HADOOP-8372-v3.patch
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 2 new or modified test files.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 eclipse:eclipse.  The patch built with eclipse:eclipse.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed unit tests in hadoop-common-project/hadoop-common.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/969//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/969//console

This message is automatically generated.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Junping Du updated HADOOP-8372:
-------------------------------

    Attachment: HADOOP-8372-v3.patch
    
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271456#comment-13271456 ] 

Junping Du commented on HADOOP-8372:
------------------------------------

Like said above, this change will break some current hadoop tests with "1.2.3" as hostname (like in TestTableMapping), as  InetAddress.getByName(String) will translate 1.2.3 to 1.2.0.3. May be checking full numeric host name (with dot) is a better way?
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271592#comment-13271592 ] 

Suresh Srinivas commented on HADOOP-8372:
-----------------------------------------

bq. "3w.org -> xx.xx.xx.xx", it is a public website start with numeric that can be resolved by DNS.
This could become an issue. But we could fix it later.

Sorry I was not clear. What I meant in my previous comment was, you could add comments to make the test easier to understand. For example, you could method level comment to say {{ /** Test for {@link NetUtils#normalizeHostNames }}. Also you could add a comment saying, when ipaddress is normalized, same address is expected in return and for a resolvable hostname, ipaddress it resolved is expected in return.

The reason why I am suggesting this is - our tests are poorly documented. When adding new features, lot more time goes into understanding tests and fixing them than implementing the feature itself.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-8372:
------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.0
     Hadoop Flags: Reviewed
           Status: Resolved  (was: Patch Available)

I committed the patch. Thank you Junping.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271585#comment-13271585 ] 

Junping Du commented on HADOOP-8372:
------------------------------------

Hey Suresh, For "3w.org -> xx.xx.xx.xx", it is a public website start with numeric that can be resolved by DNS. So this test require DNS resolving, do you think this is an issue for hadoop unit test?

                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271939#comment-13271939 ] 

Hudson commented on HADOOP-8372:
--------------------------------

Integrated in Hadoop-Hdfs-trunk-Commit #2290 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2290/])
    HADOOP-8372. NetUtils.normalizeHostName() incorrectly handles hostname starting with a numeric character. Contributed by Junping Du. (Revision 1336446)

     Result = SUCCESS
suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1336446
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java

                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 2.0.0, 3.0.0
>
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HADOOP-8372:
--------------------------------

    Fix Version/s:     (was: 3.0.0)
                       (was: 2.0.0)
                   2.0.1
    
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 2.0.1
>
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-8372:
------------------------------------

    Attachment: HADOOP-8372.patch

Minor edit to the patch:
# Removed unused imports in TestNetUtils.java (unrelated to the change from this patch)
# Added missing } to {{Test for {@link NetUtils#normalizeHostNames}}
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272353#comment-13272353 ] 

Hudson commented on HADOOP-8372:
--------------------------------

Integrated in Hadoop-Mapreduce-trunk #1075 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1075/])
    HADOOP-8372. NetUtils.normalizeHostName() incorrectly handles hostname starting with a numeric character. Contributed by Junping Du. (Revision 1336446)

     Result = SUCCESS
suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1336446
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java

                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 2.0.0, 3.0.0
>
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271967#comment-13271967 ] 

Hudson commented on HADOOP-8372:
--------------------------------

Integrated in Hadoop-Mapreduce-trunk-Commit #2232 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2232/])
    HADOOP-8372. NetUtils.normalizeHostName() incorrectly handles hostname starting with a numeric character. Contributed by Junping Du. (Revision 1336446)

     Result = ABORTED
suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1336446
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestTableMapping.java

                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 2.0.0, 3.0.0
>
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271571#comment-13271571 ] 

Junping Du commented on HADOOP-8372:
------------------------------------

Thanks all for the good comments. Will fix the tests and description soon.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-8372:
------------------------------------

    Fix Version/s: 2.0.0

I committed the patch to branch-2 as well.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 2.0.0, 3.0.0
>
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372-v3.patch, HADOOP-8372.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-8372:
------------------------------------

    Status: Patch Available  (was: Open)
    
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 0.23.0, 1.0.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271561#comment-13271561 ] 

Suresh Srinivas commented on HADOOP-8372:
-----------------------------------------

BTW can you describe the test better, especially cases "3w.org -> xx.xx.xx.xx" and "UnknownHost -> UnknownHost" better.
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Junping Du updated HADOOP-8372:
-------------------------------

    Attachment: HADOOP-8372.patch
    
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271356#comment-13271356 ] 

Junping Du commented on HADOOP-8372:
------------------------------------

This patch will use InetAddress.getByName(String) to judge if a string is a numeric IP address or symbolic address(hostname). However, this JAVA api will also take trouble that it will translate some numeric hostname like: 1.2.3 to 1.2.0.3 (or 1.2 to 1.0.0.2) as it assume this patent of numeric string is IP address. It will break some current hadoop tests with "1.2.3" as hostname (like in TestTableMapping). Thoughts?
                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Junping Du (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271628#comment-13271628 ] 

Junping Du commented on HADOOP-8372:
------------------------------------

Patch is updated with addressing TestTableMapping issue. The failure of TestViewFsTrash seems not relevant.

                
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: HADOOP-8372-v2.patch, HADOOP-8372.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (HADOOP-8372) normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character

Posted by "Arun C Murthy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arun C Murthy closed HADOOP-8372.
---------------------------------

    
> normalizeHostName() in NetUtils is not working properly in resolving a hostname start with numeric character
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8372
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8372
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io, util
>    Affects Versions: 1.0.0, 0.23.0
>            Reporter: Junping Du
>            Assignee: Junping Du
>             Fix For: 2.0.2-alpha
>
>         Attachments: HADOOP-8372.patch, HADOOP-8372.patch, HADOOP-8372-v2.patch, HADOOP-8372-v3.patch
>
>
> A valid host name can start with numeric value (You can refer RFC952, RFC1123 or http://www.zytrax.com/books/dns/apa/names.html), so it is possible in a production environment, user name their hadoop nodes as: 1hosta, 2hostb, etc. But normalizeHostName() will recognise this hostname as IP address and return directly rather than resolving the real IP address. These nodes will be failed to get correct network topology if topology script/TableMapping only contains their IPs (without hostname).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira