Skip to content


Subversion checkout URL

You can clone with
Download ZIP


chroot with ZooKeeperClient? #52

jdanbrown opened this Issue · 5 comments

2 participants


Looking at the ZooKeeperClient api (and also the implementation), it looks like there's no way to connect to the zk cluster using a chroot suffix, which I typically do just by specifying the zk connect string directly, e.g.


Ack - this would be a nice improvement. Definitely happy to take a patch if you're willing.


Sure. How about another constructor that takes the zk connect string directly? Something like:

public ZooKeeperClient(Amount<Integer, Time> sessionTimeout, Credentials credentials, String zooKeeperServers) {
  this.zooKeeperServers = zooKeeperServers;

In my experience those strings are specified as-is in the config, so I'm not sure if there's much advantage to trying to split it all up into hosts and ports and chroots, rather than just passing through the string directly and letting the ZooKeeper constructor complain if it can't parse it.


I'd prefer an additional chroot argument overload too to keep with the existing style - reasoning going like this:
Most internal usages use the Arg parsing facility to parse Arg<List<InetSocketAddress>> at startup - validation can fail fast here. The actual ZooKeeper client is then often created later in a background thread.


Ok, sounds good to me. I'll submit a pull request.


Pull requested: #53.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.