zhenjiaguo commented on a change in pull request #1428:
URL: https://github.com/apache/incubator-kyuubi/pull/1428#discussion_r753732242
##########
File path:
kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala
##########
@@ -46,6 +46,8 @@ object MetricsConf {
.stringConf
.transform(_.toUpperCase())
.toSequence()
+ .checkValue(_.forall(ReporterType.values.map(_.toString).contains),
Review comment:
`checkValues` is used one of pre-defined set, not a sequence, like
EngineType, Either `SPARK_SQL` or `FLINK_SQL`. ReporterType is conf as
sequence, like `CONSOLE,JMX`. So I don't use checkValue method.
By the way, I see a lot of sequence use `checkValue` method, maybe we should
add new check method called `checkSeqValues`.
##########
File path:
kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala
##########
@@ -46,6 +46,8 @@ object MetricsConf {
.stringConf
.transform(_.toUpperCase())
.toSequence()
+ .checkValue(_.forall(ReporterType.values.map(_.toString).contains),
Review comment:
I found it hard to implement the method `checkSeqValues`. Leave it.
--
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]