zookeeper-server-start.sh 实际上使用的是/Kafka/libs中的zookeeper jar,而不是/zookeeper/lib,如何升级zookeeper?

f8rj6qna  于 2022-12-09  发布在  Apache
关注(0)|答案(1)|浏览(160)

We have installed zookeeper 3.6.2 and Kafka 2.13-2.6.0 Recently I noticed that zookeeper-server-start.sh is actually using the zookeeper jar file from /kafka/libs/ which is zookeeper-3.5.8.jar.

  1. How do I upgrade zookeeper to 3.6.2. Do I have to find a version of kafka that has it bundled in the tar?
  2. Why do they ask you to download and install zookeeper if the jar is already bundled in kafka and that is the one that kafka uses?
nkkqxpd9

nkkqxpd91#

如果要升级Zookeeper集群,您需要单独安装(并启动)Kafka提供的版本和脚本之外的Zookeeper集群,但这会带来风险。
Kafka确实与Zookeeper捆绑在一起,并且针对特定版本进行了测试,但是它的升级频率不如Zookeeper项目的版本。在盲目升级依赖组件之前,您应该遵循Kafka升级说明;在2.6版本中有一些注解,提到了Zookeeper升级可能失败的情况,以及需要添加哪些设置来修复它。除非你能保证Zookeeper服务器升级将向后兼容,否则Kafka仍然有一个特定版本的Zookeeper客户端用于网络通信。
值得指出的是Kafka KRaft(Zookeeper-less模式)已经处于最新的3.x版本的预览发布阶段,并且计划在年底前接近生产就绪,所以我会推迟升级Zookeeper,除非你真的需要其他东西。

相关问题