public static String getHostname() {
    try {return "" + InetAddress.getLocalHost();}
    catch(UnknownHostException uhe) {return "" + uhe;}
  }
Return hostname without throwing exception.
@return hostname
common/src/java/org/apache/hive/common/util/HiveStringUtils.java