code: private String getHostNameForIp(String ipAddr) {
      try {
        // this handles the case where the hostlist contains names
        // and the datanodes are using IPs
        InetAddress addr = InetAddress.getByName(ipAddr);
        return addr.getHostName();
      } catch (Exception e) { 
        // this can be safely ignored
      }
      return null;
    }
docs: Best effort reverse DNS resolution.
  Returns null on error.