Possible, but very ugly. I do something similar to this in zk tests:
if you want to see an example.
Ted Dunning wrote:
Grovel the logs.
On Thu, Oct 1, 2009 at 3:46 PM, Todd Greenwood <to...@audiencescience.com>wrote:
From: Patrick Hunt [mailto:ph...@apache.org]
Sent: Thursday, October 01, 2009 3:44 PM
To: email@example.com; Rob Baccus
Subject: Re: How do we find the Server the client is connected to?
That detail is purposefully not exposed through the client api,
it is output to the log on connection establishment.
Why would your client code need to know which server in the ensemble
is connected to?
Rob Baccus wrote:
How do I determine the server the client is connected to? It is not
exposed as far as I can see in either the ZooKeep object or the
ClentCnxn object. I did find on line 790 in
method the place the actual server connection is happening but that