You might be able to get info from the Zookeeper "four letter words".

http://zookeeper.apache.org/doc/r3.1.2/zookeeperAdmin.html#sc_zkCommands

Here is a command to get the status for one of our Zookeeper hosts:

$ echo stat | nc zk-web02.test3.cloud.cheggnet.com 2181

wunder

On Aug 16, 2013, at 12:01 PM, Shawn Heisey wrote:

> On 8/16/2013 11:58 AM, Joshi, Shital wrote:
>> Is there a way to find if We have a zookeeper quorum? We can ping individual 
>> zookeeper and see if it is running, but it would be nice to ping/query one 
>> URL and check if we have a quorum.
> 
> This is a really good question, to which I do not have an answer.  If your 
> client code is Java, you could probably get this information out of 
> CloudSolrServer, with something like this:
> 
> server.getZkStateReader().getZkClient().getSolrZooKeeper().getState();
> 
> If the state is CONNECTED everything's probably fine.
> 
> If anyone who's dealt with Zookeeper happens to know whether this would work, 
> I'd appreciate knowing.  For Solr, it is probably a good idea to expose 
> something via an admin handler with the current zookeeper quorum state.
> 
> Thanks,
> Shawn
> 

Reply via email to