static String getServerHostName() throws Exception {
    if (msHost != null && !msHost.trim().isEmpty()) {
      return msHost.trim();
    } else {
      return InetAddress.getLocalHost().getCanonicalHostName();
    }
  }
@param port where metastore server is running
@return metastore server instance URL. If the metastore server was bound to a configured
host, return that appended by port. Otherwise, return the externally visible URL of the local
host with the given port
@throws Exception
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java