我怎么问Kafka哪些主题有特别的覆盖?

mum43rcc  于 2021-06-04  发布在  Kafka
关注(0)|答案(1)|浏览(355)

我了解我的默认保留期,但我想看看是否有任何主题对保留期有特殊覆盖。
我试过使用Kafka主题,但它与zookeeper没有联系。 kafka-topics --zookeeper localhost:2181 --describe --topics-with-overrides 我希望这个输出基本上是空的,但是我得到了错误消息:

Exception in thread "main" kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
    at kafka.zookeeper.ZooKeeperClient$$anonfun$kafka$zookeeper$ZooKeeperClient$$waitUntilConnected$1.apply$mcV$sp(ZooKeeperClient.scala:268)
    at kafka.zookeeper.ZooKeeperClient$$anonfun$kafka$zookeeper$ZooKeeperClient$$waitUntilConnected$1.apply(ZooKeeperClient.scala:264)
    at kafka.zookeeper.ZooKeeperClient$$anonfun$kafka$zookeeper$ZooKeeperClient$$waitUntilConnected$1.apply(ZooKeeperClient.scala:264)
    at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)
    at kafka.zookeeper.ZooKeeperClient.kafka$zookeeper$ZooKeeperClient$$waitUntilConnected(ZooKeeperClient.scala:264)
    at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:97)
    at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1693)
    at kafka.admin.TopicCommand$.main(TopicCommand.scala:57)
    at kafka.admin.TopicCommand.main(TopicCommand.scala)
slmsl1lt

slmsl1lt1#

原来我的zookeeper参数不正确,zookeeper不在kafka服务器上。这起作用了: kafka-topics --zookeeper myactualzookeeperserver.com:2181 --describe --topics-with-overrides

相关问题