public static String simpleHostname(String fullHostname) {
    int offset = fullHostname.indexOf('.');
    if (offset != -1) {
      return fullHostname.substring(0, offset);
    }
    return fullHostname;
  }
Given a full hostname, return the word upto the first dot.
@param fullHostname the full hostname
@return the hostname to the first dot
common/src/java/org/apache/hive/common/util/HiveStringUtils.java