clolov commented on code in PR #21273:
URL: https://github.com/apache/kafka/pull/21273#discussion_r2783099679


##########
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:
   I don't quite get this message, is it meant to say `All entries in 
CORDONED_LOG_DIRS_CONFIG must also be present in LOG_DIR_CONFIG`? As an aside, 
should we report all missing entries rather than just the first one?



-- 
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]

Reply via email to