hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-12542) TestDNS fails on Windows after HADOOP-12437.
Date Tue, 03 Nov 2015 00:08:27 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-12542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Nauroth updated HADOOP-12542:
-----------------------------------
    Attachment: HADOOP-12542.001.patch

I'm attaching a patch.  [~arpitagarwal], would you mind reviewing this?

There are 2 causes for the test failures.  First, {{TestDNS#getLoopbackInterface}} was using
the friendly display name of the interface instead of the interface name.  This didn't seem
to cause problems on any of my *nix environments, but on Windows, the loopback interface has
a friendly name that is not the same as the interface name.  These snippets from Scala REPL
sessions show the difference.  The first is from Mac, and the second is from Windows.

{code}
scala> java.net.NetworkInterface.getByInetAddress(java.net.InetAddress.getLoopbackAddress).getDisplayName
ckAddress).getDisplayName
res3: java.lang.String = lo0

scala> java.net.NetworkInterface.getByInetAddress(java.net.InetAddress.getLoopbackAddress).getName
ckAddress).getName
res4: java.lang.String = lo0
{code}

{code}
scala> java.net.NetworkInterface.getByInetAddress(java.net.InetAddress.getLoopbackAddress).getDisplayName
res2: java.lang.String = Software Loopback Interface 1

scala> java.net.NetworkInterface.getByInetAddress(java.net.InetAddress.getLoopbackAddress).getName
res3: java.lang.String = lo
{code}

The second problem is that even with the above fixed, there was still a failure in {{TestDNS#testLookupWithHostsFallback}}.
 This is because of the infamous problem we've seen many times before on Windows that it will
not resolve 127.0.0.1 to host name "localhost", despite the presence of a correct entry in
the hosts file.  The logic of {{DNS#getHosts}} refuses to return an IP address as a host name,
so the test fails on Windows.  I used {{assumeTrue}} to skip this one on Windows.

With this patch, I verified that {{TestDNS}} runs clean on both Mac and Windows.

> TestDNS fails on Windows after HADOOP-12437.
> --------------------------------------------
>
>                 Key: HADOOP-12542
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12542
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: net
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>         Attachments: HADOOP-12542.001.patch
>
>
> HADOOP-12437 added several new tests covering functionality of resolving host names based
on an alternate network interface.  These tests are failing on Windows.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message