Hadoop Common
  1. Hadoop Common
  2. HADOOP-10011

NPE if the system can't determine its own name and you go DNS.getDefaultHost(null)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Implemented
    • Affects Version/s: 3.0.0, 2.1.1-beta
    • Fix Version/s: 2.2.0
    • Component/s: None
    • Labels:
      None
    • Release Note:
      Looking at the source this has been fixed: checks for null trigger {{UnknownHostException}}

      Description

      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)

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Steve Loughran
              Reporter:
              Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development