kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: MINOR: Empty logDirs validation should include error message
Date Sun, 22 Jan 2017 23:13:29 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 20e957c9b -> 22782ccfc


MINOR: Empty logDirs validation should include error message

Author: Vogeti <svogeti@BANL149adbd9b.local>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #2407 from vogetihrsh/KAFKA-4520


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/22782ccf
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/22782ccf
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/22782ccf

Branch: refs/heads/trunk
Commit: 22782ccfc47af219ee50d61549558a5eeb83efe5
Parents: 20e957c
Author: Vogeti <svogeti@BANL149adbd9b.local>
Authored: Sun Jan 22 23:07:48 2017 +0000
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Sun Jan 22 23:10:40 2017 +0000

----------------------------------------------------------------------
 core/src/main/scala/kafka/server/KafkaConfig.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/22782ccf/core/src/main/scala/kafka/server/KafkaConfig.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/KafkaConfig.scala b/core/src/main/scala/kafka/server/KafkaConfig.scala
index 3c2a72d..b8b6d68 100755
--- a/core/src/main/scala/kafka/server/KafkaConfig.scala
+++ b/core/src/main/scala/kafka/server/KafkaConfig.scala
@@ -854,7 +854,7 @@ class KafkaConfig(val props: java.util.Map[_, _], doLog: Boolean) extends
Abstra
   /** ********* Log Configuration ***********/
   val autoCreateTopicsEnable = getBoolean(KafkaConfig.AutoCreateTopicsEnableProp)
   val numPartitions = getInt(KafkaConfig.NumPartitionsProp)
-  val logDirs = CoreUtils.parseCsvList( Option(getString(KafkaConfig.LogDirsProp)).getOrElse(getString(KafkaConfig.LogDirProp)))
+  val logDirs = CoreUtils.parseCsvList(Option(getString(KafkaConfig.LogDirsProp)).getOrElse(getString(KafkaConfig.LogDirProp)))
   val logSegmentBytes = getInt(KafkaConfig.LogSegmentBytesProp)
   val logFlushIntervalMessages = getLong(KafkaConfig.LogFlushIntervalMessagesProp)
   val logCleanerThreads = getInt(KafkaConfig.LogCleanerThreadsProp)
@@ -1072,7 +1072,7 @@ class KafkaConfig(val props: java.util.Map[_, _], doLog: Boolean) extends
Abstra
     require(logRollTimeMillis >= 1, "log.roll.ms must be equal or greater than 1")
     require(logRollTimeJitterMillis >= 0, "log.roll.jitter.ms must be equal or greater
than 0")
     require(logRetentionTimeMillis >= 1 || logRetentionTimeMillis == -1, "log.retention.ms
must be unlimited (-1) or, equal or greater than 1")
-    require(logDirs.nonEmpty)
+    require(logDirs.nonEmpty, "At least one log directory must be defined via log.dirs or
log.dir.")
     require(logCleanerDedupeBufferSize / logCleanerThreads > 1024 * 1024, "log.cleaner.dedupe.buffer.size
must be at least 1MB per cleaner thread.")
     require(replicaFetchWaitMaxMs <= replicaSocketTimeoutMs, "replica.socket.timeout.ms
should always be at least replica.fetch.wait.max.ms" +
       " to prevent unnecessary socket timeouts")


Mime
View raw message