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 "Steve Loughran (JIRA)" <ji...@apache.org> on 2014/02/11 01:56:19 UTC

[jira] [Resolved] (HADOOP-10011) NPE if the system can't determine its own name and you go DNS.getDefaultHost(null)

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

Steve Loughran resolved HADOOP-10011.
-------------------------------------

       Resolution: Implemented
    Fix Version/s: 2.2.0
     Release Note: Looking at the source this has been fixed: checks for null trigger {{UnknownHostException}}

> NPE if the system can't determine its own name and you go DNS.getDefaultHost(null)
> ----------------------------------------------------------------------------------
>
>                 Key: HADOOP-10011
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10011
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 2.1.1-beta
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> In a test case that I am newly writing, on my infamous "home machine with broken DNS", I cant call getByName(null) without seeing a stack trace:
> Testcase: testNullInterface took 0.014 sec
> 	Caused an ERROR
> null
> java.lang.NullPointerException
> 	at java.net.NetworkInterface.getByName(NetworkInterface.java:226)
> 	at org.apache.hadoop.net.DNS.getIPs(DNS.java:94)
> 	at org.apache.hadoop.net.DNS.getHosts(DNS.java:141)
> 	at org.apache.hadoop.net.DNS.getDefaultHost(DNS.java:218)
> 	at org.apache.hadoop.net.DNS.getDefaultHost(DNS.java:235)
> 	at org.apache.hadoop.net.TestDNS.testNullInterface(TestDNS.java:62)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)