in kyuubi-relocated-hive-metastore-client/src/main/java/org/apache/kyuubi/shaded/hive/metastore/conf/TimeValidator.java [45:68]
public void validate(String value) {
// First just check that this translates
TimeUnit defaultUnit = unit;
long time = MetastoreConf.convertTimeStr(value, defaultUnit, defaultUnit);
if (min != null) {
if (minInclusive ? time < min : time <= min) {
throw new IllegalArgumentException(
value
+ " is smaller than minimum "
+ min
+ MetastoreConf.timeAbbreviationFor(defaultUnit));
}
}
if (max != null) {
if (maxInclusive ? time > max : time >= max) {
throw new IllegalArgumentException(
value
+ " is larger than maximum "
+ max
+ MetastoreConf.timeAbbreviationFor(defaultUnit));
}
}
}