首页  

kafka在zookeeper中的元数据     所属分类 kafka 浏览量 115
一个zk集群可以管理多个kafka集群
kafka配置文件 指定root,比如/kafka 

kafka1.1.0 

add the zkroot at the end of the zookeeper.connect string
zookeeper.connect=server1:2181,server2:2181/kafka


admin    管理接口操作的相关信息,主要为 topic 删除事件,分区迁移事件,优先副本选举 
brokers  broker 相关的信息,broker 节点以及节点上的 topic 信息
cluster  集群信息
config   动态配置信息
consumers  消费者相关信息  ( 一般为空)
controller  控制节点信息 (临时节点,用于 controller 节点注册选举)
controller_epoch  controller 节点当前的年龄
isr_change_notification    isr 变更通知 (  isr 变动时,用于事件通知,用 watch 获取集群 isr 变更)
latest_producer_id_block   处理事务相关的 pid 范围
log_dir_event_notification   日志目录事件通知

/kafka/cluster/id	
{"version":"1","id":"ycyn9E13Qs-AkEbwN0euaA"}

/kafka/controller	
{"version":1,"brokerid":1,"timestamp":"1597727176890"}


/kafka/admin/delete_topics

/brokers/ids
/brokers/topics
/brokers/ids/1
/brokers/topics/__consumer_offsets
/topics/__consumer_offsets/partitions
/brokers/topics/__consumer_offsets/partitions/1/state

ls /kafka/config
[brokers, changes, clients, topics, users]
如不设置动态参数,相关目录一般为空

0.9版本后offest不在zk上,由kafka内部topic 维护  __consumer_offsets

/kafka/brokers/ids/0	
{"listener_security_protocol_map":{"PLAINTEXT":"PLAINTEXT"},"endpoints":["PLAINTEXT://localhost:9092"],"jmx_port":9995,"host":"localhost","timestamp":"1597727177018","port":9092,"version":4}


/kafka/brokers/topics/kafka_demo_test_topic	
{"version":1,"partitions":{"4":[0,1],"5":[1,2],"1":[0,2],"0":[2,1],"2":[1,0],"3":[2,0]}}

/kafka/brokers/topics/kafka_demo_test_topic/partitions/0/state	
{"controller_epoch":5,"leader":2,"version":1,"leader_epoch":3,"isr":[1,2]}




kafka消费者offset记录位置和方式 kafka运维常用命令

上一篇     下一篇
zookeeper四字命令conf结果说明

Zookeeper四字命令

降级 限流 熔断 简单理解

Kafka配置参数

kafka集群搭建

kafka命令行发送接收消息