How does the connection string given to CuratorFrameworkFactory#newClient
look like? So far I haven't found any information on the web and the JavaDoc doesn't tell me the correct format.
According to this post, it is of the format
IP1:PORT1,IP2:PORT2,...,IPn:PORTn
. For example:
127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183,127.0.0.1:2184
Curator is an API client for Apache Zookeeper so the full documented answer to this is available in the Zookeeper Javadocs: Zookeeper Javadocs
connectString - comma separated host:port pairs, each corresponding to a zk server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" If the optional chroot suffix is used the example would look like: "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" where the client would be rooted at "/app/a" and all paths would be relative to this root - ie getting/setting/etc... "/foo/bar"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With