Read `controller_epoch` and `leader_epoch` from kafka CLI

I lost some data from ZK in my Kafka cluster. I’m trying to reconstruct those from kafka CLIs.

E.g. I’m reading info about partitions using kafka-topics --bootstrap-server "127.0.0.1:9092" --topic "t1" --describe to get partition info.

However, I’d also like to read controller_epoch and leader_epoch because it’s contained in /brokers/topics/t1/partitions/0/state zkNode:
{"controller_epoch":4,"leader":9999,"version":1,"leader_epoch":0,"isr":[9999]}

Is there a way to get that info from any kafka CLIs?

Read more here: Source link