You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Robert Stewart <Ro...@epam.com> on 2013/07/09 16:36:59 UTC

Is there an easy way to know if a Solr cloud node is a shard leader?

I would like to be able to do it without consulting Zookeeper. Is there some variable or API I can call on a specific Solr cloud node to know if it is currently a shard leader?  The reason I want to know is I want to perform index backup on the shard leader from a cron job *only* if that node is a shard leader.

Bob

Re: Is there an easy way to know if a Solr cloud node is a shard leader?

Posted by Mark Miller <ma...@gmail.com>.
If you call /solr/zookeeper on a specific node, that servlet would tell you - output is a bit verbose for what you want though.

- Mark

On Jul 9, 2013, at 10:36 AM, Robert Stewart <Ro...@epam.com> wrote:

> I would like to be able to do it without consulting Zookeeper. Is there some variable or API I can call on a specific Solr cloud node to know if it is currently a shard leader?  The reason I want to know is I want to perform index backup on the shard leader from a cron job *only* if that node is a shard leader.
> 
> Bob