Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-10011

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • 2.1.1-beta, 3.0.0-alpha1
    • 2.2.0
    • None
    • None
    • 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)

      Attachments

        Issue Links

          Activity

            People

              stevel@apache.org Steve Loughran
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: