apache-kafka - 带有引导服务器的 kafka 主题描述显示不同的主题配置
问题描述
[root@AdtechQAxxxx ~]# /opt/kafka-2.3.0/bin/kafka-topics.sh --zookeeper 192.169.xx.xx:2181 --describe --topic dl_query
Topic:dl_query PartitionCount:10 ReplicationFactor:2 Configs:
Topic: dl_query Partition: 0 Leader: 3 Replicas: 3,1 Isr: 3,1
Topic: dl_query Partition: 1 Leader: 1 Replicas: 1,2 Isr: 1,2
Topic: dl_query Partition: 2 Leader: 2 Replicas: 2,3 Isr: 2,3
Topic: dl_query Partition: 3 Leader: 3 Replicas: 3,2 Isr: 3,2
Topic: dl_query Partition: 4 Leader: 1 Replicas: 1,3 Isr: 1,3
Topic: dl_query Partition: 5 Leader: 2 Replicas: 2,1 Isr: 2,1
Topic: dl_query Partition: 6 Leader: 3 Replicas: 3,1 Isr: 3,1
Topic: dl_query Partition: 7 Leader: 1 Replicas: 1,2 Isr: 1,2
Topic: dl_query Partition: 8 Leader: 2 Replicas: 2,3 Isr: 2,3
Topic: dl_query Partition: 9 Leader: 3 Replicas: 3,2 Isr: 3,2
[root@AdtechQAxxxx ~]# /opt/kafka-2.3.0/bin/kafka-topics.sh --bootstrap-server 192.169.xx.xx:9092 --describe --topic dl_query
Topic:dl_query PartitionCount:10 ReplicationFactor:2 **Configs:compression.type=gzip,segment.bytes=1073741824,max.message.bytes=100001200**
Topic: dl_query Partition: 0 Leader: 3 Replicas: 3,1 Isr: 3,1
Topic: dl_query Partition: 1 Leader: 1 Replicas: 1,2 Isr: 1,2
Topic: dl_query Partition: 2 Leader: 2 Replicas: 2,3 Isr: 2,3
Topic: dl_query Partition: 3 Leader: 3 Replicas: 3,2 Isr: 3,2
Topic: dl_query Partition: 4 Leader: 1 Replicas: 1,3 Isr: 1,3
Topic: dl_query Partition: 5 Leader: 2 Replicas: 2,1 Isr: 2,1
Topic: dl_query Partition: 6 Leader: 3 Replicas: 3,1 Isr: 3,1
Topic: dl_query Partition: 7 Leader: 1 Replicas: 1,2 Isr: 1,2
Topic: dl_query Partition: 8 Leader: 2 Replicas: 2,3 Isr: 2,3
Topic: dl_query Partition: 9 Leader: 3 Replicas: 3,2 Isr: 3,2
解决方案
Kafka-topics 命令最近更新为使用 AdminClo 类,该类需要引导服务器而不是 Zookeeper,最终目标是完全删除对 Zookeeper 的依赖 (KIP-500)。
至于为什么你会看到不同的主题配置,这些数据现在实际上存储在 Zookeeper 中,所以我不确定你为什么会看到这种差异。AdminClient 可能会返回实际的代理默认配置以及主题配置。否则,也许创建一个 JIRA 或尝试升级 Kafka?
推荐阅读
- javascript - 如何等到数据被获取并使用 redux 更新状态
- android - 无法使用标准 firebase 在管理员 firebase 用户下创建用户,因为它已启动当前用户
- php - 在 centos 上从 src 代码编译 PHP5.5 失败
- javascript - 从包含特定字符的字符串中获取单词。(像 # 或 @ 例如一个帖子规划师)
- canvas - 是否可以在画布上为每个操作设置一个过滤器?
- android - Android Studio 更新重复 Java 和 res 文件夹
- typescript - 具有联合类型的类型不存在属性
- wordpress - 带有幽灵类别的 Wordpress 主类别
- umbraco8 - 如何在 HttpHandler 中获取 UmbracoHelper?
- javascript - antd表动作和onrow函数