mimaison commented on code in PR #21273:
URL: https://github.com/apache/kafka/pull/21273#discussion_r2789927550
##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -480,6 +480,17 @@ class KafkaConfig private(doLog: Boolean, val props:
util.Map[_, _])
advertisedListeners.filterNot(l =>
controllerListenerNames.contains(l.listener))
}
+ def validateCordonedLogDirs(): Unit = {
+ val cordonedLogDirs = getList(ServerLogConfigs.CORDONED_LOG_DIRS_CONFIG)
+ if (cordonedLogDirs.contains(ServerLogConfigs.CORDONED_LOG_DIRS_ALL)) {
+ require(cordonedLogDirs.size == 1, s"When
${ServerLogConfigs.CORDONED_LOG_DIRS_CONFIG} is set to
${ServerLogConfigs.CORDONED_LOG_DIRS_ALL}, it must not contain other values")
+ } else {
+ for (cordonedLogDir <- cordonedLogDirs.asScala) {
+ require(logDirs().contains(cordonedLogDir), s"All entries in
${ServerLogConfigs.CORDONED_LOG_DIRS_CONFIG} must be included in
${ServerLogConfigs.CORDONED_LOG_DIRS_CONFIG} or
${ServerLogConfigs.LOG_DIR_CONFIG}. Missing entry : $cordonedLogDir")
Review Comment:
> is it meant to say All entries in CORDONED_LOG_DIRS_CONFIG must also be
present in LOG_DIR_CONFIG?
Yes. You can only cordon log dirs that exist. I've rephrased the error
message and made it include all missing entries.
--
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]