问题描述
我所说的集群信息,是指类似的信息
By saying cluster info, I am referring to information like
- 订阅的消费者/消费者群体
- 已读和已提交的偏移量
- 分区的领导者和追随者 服务器上的
- 主题等
- subscribed consumers/consumer groups
- read and committed offsets
- leaders and followers of a partition
- topics on the serveretc.
zookeeper是将这些信息保存在自己的数据库中(尽管我从未听说过Zookeeper拥有自己的直到此日期的任何数据库),还是将这些信息存储在Kafka集群中有关某些主题的信息等等?
Does zookeeper keep this info in its own db (though I never heard of zookeeper having any db of its own till date) or it stores this info in the Kafka cluster on some topics etc?
和后续问题: Zookeeper如何从__consumer_offsets主题检索消费者补偿?
推荐答案
ZooKeeper数据模型ZooKeeper具有分层的名称空间,非常类似于分布式文件系统.唯一的区别是,名称空间中的每个节点都可以具有与其关联的数据以及子级.就像拥有一个文件系统一样,该文件系统也允许文件成为目录.到节点的路径始终表示为规范,绝对,斜杠分隔的路径.没有相对的参考.
The ZooKeeper Data ModelZooKeeper has a hierarchal name space, much like a distributed file system. The only difference is that each node in the namespace can have data associated with it as well as children. It is like having a file system that allows a file to also be a directory. Paths to nodes are always expressed as canonical, absolute, slash-separated paths; there are no relative reference.
因此没有数据库.
在以下主题中,偏移量保存在kafka中,而不保存在zookeeper中:__consumer_offsets
Offsets are kept in kafka, not in zookeeper, in this topic: __consumer_offsets
在Zookeeper节点中:
In a zookeeper node:
ls/经纪人/ids
ls /brokers/ids
ls/经纪人/主题
获取/brokers/ids/0
get /brokers/ids/0
在这里您可以阅读有关zookeeper中的kafka数据结构的更多信息: Kafka数据结构动物园管理员
here you can read more about the kafka datastructures in zookeeper: Kafka datastructures zookeeper
有一个共同删除动物园管理员的KIP: KIP删除Zookeeper
There is a KIP for removing zookeeper alltogether: KIP Remove zookeeper
这篇关于动物园管理员在哪里存储kafka群集和相关信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!