Repository: kafka Updated Branches: refs/heads/trunk 478505632 -> 9650e12df
kafka-2262; LogSegmentSize validation should be consistent; patched by Manikumar Reddy; reviewed by Jun Rao Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/9650e12d Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/9650e12d Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/9650e12d Branch: refs/heads/trunk Commit: 9650e12df2502f85ea665ae46a982d6fd0d2a954 Parents: 4785056 Author: Manikumar Reddy <manikumar.re...@gmail.com> Authored: Tue Jun 16 15:50:17 2015 -0700 Committer: Jun Rao <jun...@gmail.com> Committed: Tue Jun 16 15:50:17 2015 -0700 ---------------------------------------------------------------------- core/src/main/scala/kafka/log/LogConfig.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kafka/blob/9650e12d/core/src/main/scala/kafka/log/LogConfig.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/kafka/log/LogConfig.scala b/core/src/main/scala/kafka/log/LogConfig.scala index a907da0..f64fd79 100755 --- a/core/src/main/scala/kafka/log/LogConfig.scala +++ b/core/src/main/scala/kafka/log/LogConfig.scala @@ -22,6 +22,7 @@ import org.apache.kafka.common.utils.Utils import scala.collection._ import org.apache.kafka.common.config.ConfigDef import kafka.message.BrokerCompressionCodec +import kafka.message.Message object Defaults { val SegmentSize = 1024 * 1024 @@ -162,7 +163,7 @@ object LogConfig { import java.util.Arrays.asList new ConfigDef() - .define(SegmentBytesProp, INT, Defaults.SegmentSize, atLeast(0), MEDIUM, SegmentSizeDoc) + .define(SegmentBytesProp, INT, Defaults.SegmentSize, atLeast(Message.MinHeaderSize), MEDIUM, SegmentSizeDoc) .define(SegmentMsProp, LONG, Defaults.SegmentMs, atLeast(0), MEDIUM, SegmentMsDoc) .define(SegmentJitterMsProp, LONG, Defaults.SegmentJitterMs, atLeast(0), MEDIUM, SegmentJitterMsDoc) .define(SegmentIndexBytesProp, INT, Defaults.MaxIndexSize, atLeast(0), MEDIUM, MaxIndexSizeDoc)