public static String getAsString(Configuration conf, ConfVars var) {
    if (var.defaultVal.getClass() == String.class) {
      return getVar(conf, var);
    } else if (var.defaultVal.getClass() == Boolean.class) {
      return Boolean.toString(getBoolVar(conf, var));
    } else if (var.defaultVal.getClass() == Long.class) {
      return Long.toString(getLongVar(conf, var));
    } else if (var.defaultVal.getClass() == Double.class) {
      return Double.toString(getDoubleVar(conf, var));
    } else if (var.defaultVal.getClass() == TimeValue.class) {
      TimeUnit timeUnit = ((TimeValue)var.defaultVal).unit;
      return getTimeVar(conf, var, timeUnit) + timeAbbreviationFor(timeUnit);
    } else {
      throw new RuntimeException("Unknown type for getObject " + var.defaultVal.getClass().getName());
    }
  }
Return the configuration value as a String.  For time based values it will be returned in
the default time unit appended with an appropriate abbreviation (eg s for seconds, ...)
@param conf configuration to read
@param var variable to read
@return value as a String
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java