Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-5432

TestDatanodeJsp fails on Windows due to assumption that loopback address resolves to host name localhost.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: datanode, test
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      As discussed in many previous issues, Windows differs from Unixes in that it does not resolve the loopback address to hostname "localhost". Instead, the host name remains unresolved as "127.0.0.1". TestDatanodeJsp fails on Windows, because it attempts to assert a string match containing "localhost" as the host name.

      1. HDFS-5432.1.patch
        1 kB
        Chris Nauroth
      2. HDFS-5432.2.patch
        1 kB
        Chris Nauroth
      3. HDFS-5432.2.patch
        1 kB
        Chris Nauroth

        Activity

        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #1595 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1595/)
        HDFS-5432. TestDatanodeJsp fails on Windows due to assumption that loopback address resolves to host name localhost. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1537230)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDatanodeJsp.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #1595 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1595/ ) HDFS-5432 . TestDatanodeJsp fails on Windows due to assumption that loopback address resolves to host name localhost. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1537230 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDatanodeJsp.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #1569 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1569/)
        HDFS-5432. TestDatanodeJsp fails on Windows due to assumption that loopback address resolves to host name localhost. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1537230)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDatanodeJsp.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #1569 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1569/ ) HDFS-5432 . TestDatanodeJsp fails on Windows due to assumption that loopback address resolves to host name localhost. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1537230 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDatanodeJsp.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk #379 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/379/)
        HDFS-5432. TestDatanodeJsp fails on Windows due to assumption that loopback address resolves to host name localhost. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1537230)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDatanodeJsp.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #379 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/379/ ) HDFS-5432 . TestDatanodeJsp fails on Windows due to assumption that loopback address resolves to host name localhost. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1537230 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDatanodeJsp.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hadoop-trunk-Commit #4673 (See https://builds.apache.org/job/Hadoop-trunk-Commit/4673/)
        HDFS-5432. TestDatanodeJsp fails on Windows due to assumption that loopback address resolves to host name localhost. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1537230)

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDatanodeJsp.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #4673 (See https://builds.apache.org/job/Hadoop-trunk-Commit/4673/ ) HDFS-5432 . TestDatanodeJsp fails on Windows due to assumption that loopback address resolves to host name localhost. Contributed by Chris Nauroth. (cnauroth: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1537230 ) /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDatanodeJsp.java
        Hide
        Chris Nauroth added a comment -

        I've committed this to trunk, branch-2, and branch-2.2. Thanks to Vinay and Arpit for code reviews.

        Show
        Chris Nauroth added a comment - I've committed this to trunk, branch-2, and branch-2.2. Thanks to Vinay and Arpit for code reviews.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12611102/HDFS-5432.2.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 javac. The applied patch does not increase the total number of javac compiler warnings.

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

        +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-hdfs-project/hadoop-hdfs.

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

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/5316//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/5316//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/12611102/HDFS-5432.2.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 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +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-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/5316//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/5316//console This message is automatically generated.
        Hide
        Chris Nauroth added a comment -

        Re-uploading the same patch to try to inspire Jenkins.

        Show
        Chris Nauroth added a comment - Re-uploading the same patch to try to inspire Jenkins.
        Hide
        Arpit Agarwal added a comment -

        +1 for the updated patch also.

        Show
        Arpit Agarwal added a comment - +1 for the updated patch also.
        Hide
        Chris Nauroth added a comment -

        Thanks for the reviews, but I'm uploading a new version. I think we can avoid the Windows-specific conditional by pulling the correct host name out of the InetSocketAddress. I re-tested this successfully on Mac and Windows.

        Does this still look OK?

        Show
        Chris Nauroth added a comment - Thanks for the reviews, but I'm uploading a new version. I think we can avoid the Windows-specific conditional by pulling the correct host name out of the InetSocketAddress . I re-tested this successfully on Mac and Windows. Does this still look OK?
        Hide
        Arpit Agarwal added a comment -

        +1 for the patch.

        Verified results with and without your patch on Windows.

        Show
        Arpit Agarwal added a comment - +1 for the patch. Verified results with and without your patch on Windows.
        Hide
        Vinayakumar B added a comment -

        +1. Patch looks good Chris.
        I ran the test with and without fix. Its working.

        Show
        Vinayakumar B added a comment - +1. Patch looks good Chris. I ran the test with and without fix. Its working.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12610441/HDFS-5432.1.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 javac. The applied patch does not increase the total number of javac compiler warnings.

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

        +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-hdfs-project/hadoop-hdfs.

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

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/5288//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/5288//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/12610441/HDFS-5432.1.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 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +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-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/5288//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/5288//console This message is automatically generated.
        Hide
        Chris Nauroth added a comment -

        This patch changes the assertion so that it checks for "127.0.0.1" on Windows or "localhost" on other platforms.

        Show
        Chris Nauroth added a comment - This patch changes the assertion so that it checks for "127.0.0.1" on Windows or "localhost" on other platforms.

          People

          • Assignee:
            Chris Nauroth
            Reporter:
            Chris Nauroth
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development