MINOR: LogCleaner.validateReconfiguration fixes
Reviewers: Rajini Sivaram
@@ -161,9 +161,8 @@ class LogCleaner(initialConfig: CleanerConfig,
override def validateReconfiguration(newConfig: KafkaConfig): Unit = {
val newCleanerConfig = LogCleaner.cleanerConfig(newConfig)
val numThreads = newCleanerConfig.numThreads
- numThreads >= 1 && numThreads >= config.numThreads / 2 && numThreads <= config.numThreads * 2
val currentThreads = config.numThreads
- if (numThreads <= 0)
+ if (numThreads < 1)
throw new ConfigException(s"Log cleaner threads should be at least 1")
if (numThreads < currentThreads / 2)
throw new ConfigException(s"Log cleaner threads cannot be reduced to less than half the current value $currentThreads")
