[英]Kafka: configuration by partition or by topic?
I created a topic in my kafka cluster with the following command. 我使用以下命令在kafka集群中创建了一个主题。
/opt/kafka/bin/kafka-topics.sh --zookeeper kaf1:2181,kaf2:2181,kaf3:2181 --create --topic mytopic --partitions 10 --replication-factor 2 --config retention.bytes=1074000000 --config delete.retention.ms=6000 --config segment.bytes=105000000
So, if I understand correctly the documentation, I have a topic with 10 partitions replicate 2 times beetween my 3 kafka hosts. 因此,如果我对文档的理解正确,那么我的主题是在3个kafka主机之间复制10次分区两次。 Next, each kafka host must retain 1Go of data.
接下来,每个kafka主机必须保留1Go数据。 Each segment has a size of 100Mo and all old logs will be delete after 1 minute.
每个段的大小为100Mo,所有旧日志将在1分钟后删除。
Now, when I do a du -h
on my logs directory on a kafka hosts, I have this: 现在,当我在kafka主机上的日志目录中执行
du -h
时,我有以下内容:
1,2G ./mytopic-2 1,1G ./mytopic-8 1,2G ./mytopic-9 1,1G ./mytopic-6 1,1G ./mytopic-3 1,1G ./mytopic-0 1,2G ./mytopic-4 7,6G .
I thought get 1Go for the directory entirely and not for each partition. 我以为整个目录而不是每个分区都可以得到1Go。
So my question is simple, the topic configuration is for each partition or for the all topic ? 所以我的问题很简单,主题配置是针对每个分区还是针对所有主题?
Thanks. 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.