0

我了解我的默认保留期,但我想查看是否有任何主题对保留期有特殊覆盖。

我试过使用 kafka-topics,但它没有与 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)
4

1 回答 1

0

原来我的 zookeeper 参数不正确,zookeeper 没有托管在 kafka 服务器上。这有效:

kafka-topics --zookeeper myactualzookeeperserver.com:2181 --describe --topics-with-overrides

于 2019-08-26T19:43:50.637 回答