[sheepdog] [PATCH] multi-sheep cluster in one zookeeper cluster.
Yuyang
yuyangcm at 139.com
Fri Feb 27 05:47:56 CET 2015
Yeah, I just see it and would change this way to achieve the same goal.
We can append the "$root" behind the connection string (hosts list).
Maybe this is the best way.
From: Liu Yuan
Date: 2015-02-27 12:04
To: Yifeng Xu
CC: Ruoyu; Yu Yang; sheepdog
Subject: Re: [sheepdog] [PATCH] multi-sheep cluster in one zookeeper cluster.
On Fri, Feb 27, 2015 at 11:51:22AM +0800, Yifeng Xu wrote:
> Is this patch really necessary ? I think zookeeper C client support
> chroot, if you read zookeeper.c source code, you will find it,
> here is some code quoted:
>
> /**
> * Create a zookeeper handle associated with the given host and port.
> */
> zhandle_t *zookeeper_init(const char *host, watcher_fn watcher,
> int recv_timeout, const clientid_t *clientid, void *context, int flags)
> ...
> //parse the host to get the chroot if
> //available
> index_chroot = strchr(host, '/');
> if (index_chroot) {
> zh->chroot = strdup(index_chroot);
> if (zh->chroot == NULL) {
> goto abort;
> }
>
Intresting. How we take advantage of this feature? Did you mean that we can
just append the cluster id on to "host" parameter?
Thanks
Yuan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20150227/c200268a/attachment-0004.html>
More information about the sheepdog
mailing list