Why do you think you need to know which node is "the leader"? Answer: You
don't - SolrClound is NOT a master/slave architecture; there is no "master"
node.
Each shard has its own "leader", which can vary over time. It's called
"leader election". But, there is no cosmic significance to being a leader
node that applications need to be aware of. Think of it as an internal
detail; focus on external details for your application interface.
Since SolrCloud is a master-free architecture, you can send both queries and
updates to ANY node and SolrCloud will assure that the data gets to where it
belongs and queries gets distributed to the nodes that have the data needed
to satisfy the queries.
-- Jack Krupansky
-----Original Message-----
From: kowish.adamosh
Sent: Saturday, July 13, 2013 5:11 AM
To: solr-user@lucene.apache.org
Subject: SolrCloud leader
Hi guys,
Is it possible to determine (by the server node itself) in SolrCloud if the
node is the leader? One possible solution is to use CloudSolrServer and
fetch leader address but how can I check address of the current node (I can
see it in configuration but how to get configuration programmatically)?
Maybe there is better solution than invoking CloudSolrServer by one of the
server nodes (which is not so good idea)?
Kowish
--
View this message in context:
http://lucene.472066.n3.nabble.com/SolrCloud-leader-tp4077759.html
Sent from the Solr - User mailing list archive at Nabble.com.