bowenliang123 commented on code in PR #5228:
URL: https://github.com/apache/kyuubi/pull/5228#discussion_r1312776863


##########
kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala:
##########
@@ -342,31 +343,31 @@ object KyuubiConf {
       .doc("How long to wait before retrying to fetch new credentials after a 
failure.")
       .version("1.4.0")
       .timeConf
-      .checkValue(t => t > 0, "must be positive integer")
+      .checkPositive
       .createWithDefault(Duration.ofMinutes(1).toMillis)
 
   val CREDENTIALS_UPDATE_WAIT_TIMEOUT: ConfigEntry[Long] =
     buildConf("kyuubi.credentials.update.wait.timeout")
       .doc("How long to wait until the credentials are ready.")
       .version("1.5.0")
       .timeConf
-      .checkValue(t => t > 0, "must be positive integer")
+      .checkPositive
       .createWithDefault(Duration.ofMinutes(1).toMillis)
 
   val CREDENTIALS_CHECK_INTERVAL: ConfigEntry[Long] =
     buildConf("kyuubi.credentials.check.interval")
       .doc("The interval to check the expiration of cached <user, 
CredentialsRef> pairs.")
       .version("1.6.0")
       .timeConf
-      .checkValue(_ > Duration.ofSeconds(3).toMillis, "Minimum 3 seconds")
+      .checkDurationRange(min = Some(Duration.ofSeconds(3)))

Review Comment:
   It's very likely an original typing mistake from #1021. The 'Minimum' term 
in the error message hints allowing `>=` inclusively rather than `>` 
exclusively as well. And there's no technical issue to exclude the start value 
in this config. Also, in Scala's numeric `Range`, the start value is always 
inclusive.
   
   cc @lightning-L 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to