简体   繁体   English

卡夫卡在重新平衡转移的分区时是否应用压缩

[英]does kafka apply compression on rebalancing to transferred partitions

Our new kafka cluster was running out of space faster than anticipated, so I took some measures to mitigate: 我们新的kafka群集空间耗尽的速度超出了预期,因此我采取了一些措施来缓解:

1) I turned on snappy compression for the topics in question: this was done on the broker-side with a "kafka-topics --config compression.type=snappy" command, so as not to interrupt producers 1)我为有问题的主题启用了快速压缩:这是在代理端使用“ kafka-topics --config compression.type = snappy”命令完成的,以免中断生产者

2) I doubled the number of kafka nodes in the cluster 2)我将集群中的kafka节点数量增加了一倍

3) I rebalanced the cluster. 3)我重新平衡了群集。

These steps worked and we have bought some time. 这些步骤有效,我们花了一些时间。 I know that [1] only applies to newly-produced data, but I was wondering if partitions which were rebalanced to the new nodes would be compressed when they arrived at their new broker, or whether they would retain their original form (there was no producer compression, so they were all uncompressed). 我知道[1]仅适用于新产生的数据,但是我想知道重新平衡到新节点的分区在到达新代理时是否会被压缩,或者它们是否将保留其原始格式(没有生产者压缩,因此它们都未压缩)。 The old nodes had some other stuff on them which makes it difficult to infer from a simple disk usage analysis. 旧节点上还有其他内容,因此很难通过简单的磁盘使用情况分析来推断。

在重新分配分区期间,记录将被压缩并写入新代理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM