@Override
    public String validate(String value) {
      try {
        long size = HiveConf.toSizeBytes(value);
        if (min != null && (minInclusive ? size < min : size <= min)) {
          return value + " is smaller than " + sizeString(min);
        }
        if (max != null && (maxInclusive ? size > max : size >= max)) {
          return value + " is bigger than " + sizeString(max);
        }
      } catch (Exception e) {
        return e.toString();
      }
      return null;
    }
validate value for a ConfVar, return non-null string for fail message
common/src/java/org/apache/hadoop/hive/conf/Validator.java