Hadoop Common
  1. Hadoop Common
  2. HADOOP-8238

NetUtils#getHostNameOfIP blows up if given ip:port string w/o port

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-alpha
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      NetUtils#getHostNameOfIP blows up if not given a string of form ip:port, because the regex matches the port optionally but the code requires a semicolon. It also doesn't check the given string for null.

        Activity

        Hide
        Eli Collins added a comment -

        Patch attached. Now accepts ip or ip:port, does not accept null, ip:, etc. Added a test for this method.

        Show
        Eli Collins added a comment - Patch attached. Now accepts ip or ip:port, does not accept null, ip:, etc. Added a test for this method.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12520843/hadoop-8238.txt
        against trunk revision .

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

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

        +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 .

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

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

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12520843/hadoop-8238.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +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 . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/808//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/808//console This message is automatically generated.
        Hide
        Aaron T. Myers added a comment -

        +1, the patch looks good to me.

        Show
        Aaron T. Myers added a comment - +1, the patch looks good to me.
        Hide
        Eli Collins added a comment -

        Thanks ATM, I've committed this and merged to branch-2.

        Show
        Eli Collins added a comment - Thanks ATM, I've committed this and merged to branch-2.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1977 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1977/)
        HADOOP-8238. NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192
        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
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1977 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1977/ ) HADOOP-8238 . NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192 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
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1965 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1965/)
        HADOOP-8238. NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192
        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
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1965 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1965/ ) HADOOP-8238 . NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192 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
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2040 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2040/)
        HADOOP-8238. NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192
        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
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2040 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2040/ ) HADOOP-8238 . NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192 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
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1003 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1003/)
        HADOOP-8238. NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192
        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
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1003 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1003/ ) HADOOP-8238 . NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192 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
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1038 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1038/)
        HADOOP-8238. NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192
        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
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1038 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1038/ ) HADOOP-8238 . NetUtils#getHostNameOfIP blows up if given ip:port string w/o port. Contributed by Eli Collins (Revision 1308192) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1308192 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

          People

          • Assignee:
            Eli Collins
            Reporter:
            Eli Collins
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development