2

As per APIDOC : https://zookeeper.apache.org/doc/r3.2.2/api/org/apache/zookeeper/ZooKeeper.html

public org.apache.zookeeper.ZooKeeper.ZooKeeper(
  String connectString,
  int sessionTimeout,
  Watcher watcher) throws IOException

Above function accepts connection string which is nothing but CSV of host:port, Which to me looks like hardcoding required at either code/constants/xml/config-service somewhere. But as hosts withing Zookeeper can keep on changing this string can go stale at any point in time and System-Admin to Developer communication to upgrade this might get delays.

Do we have any other better/dynamic way to connect to zookeeper ?

Looked at below but all are doing host:port.

  1. connecting to zookeeper in different server
  2. configure Druid to connect to Zookeeper on port 5181
Community
  • 1
  • 1
Birlax
  • 21
  • 3

0 Answers0