public static String getCanonicalHostName() {
    try {
      return InetAddress.getLocalHost().getCanonicalHostName();
    } catch (UnknownHostException e) {
      return LOCALHOST;
    }
  }
Will return FQDN of the host after doing reverse DNS lookip.

@return FQDN of host
llap-client/src/java/org/apache/hadoop/hive/registry/RegistryUtilities.java