You can always query Zookeeper and find that information out.
Take a look at CloudSolrServer, maybe ZkCoreNodeProps etc.
for examples since CloudSolrServer is "leader aware", it
should have some clues...

Or maybe ZkStateReader? I haven't been in that code much,
so I can't be more specific...

But why do you have this requirement? What do you hope to
accomplish? Because this is often the kind of thing that's seems
more useful than it is...

Best
Erick


On Wed, Jul 3, 2013 at 3:05 AM, vicky desai <vicky.de...@germinait.com>wrote:

> Hi ,
>
> I have a set up of 1 leader and 1 replica and I have a requirement where in
> I need to find the leader core from the collection. Is there an api in
> solrj
> by means of which this can be achieved.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Is-it-possible-to-find-a-leader-from-a-list-of-cores-in-solr-via-java-code-tp4074994.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to