I had a similar need. The resulting tool is in scala, but it still might
be useful to look at. I had to work through some of those same issues:
https://github.com/whitepages/solrcloud_manager
From a clusterstate perspective, I mostly cared about active vs
non-active, so hereĀ¹s a sample output
Thanks for the comments!!
I found out the solution on how I can get the replica's state. Here's the
piece of code.
while (iter.hasNext()) {
Slice slice = iter.next();
for(Replica replica:slice.getReplicas()) {
System.out.println(replica state for +
Solr has a Admin UI where we can check each and every Collections that were
deployed to Solr Cloud. For example, I can see a Slice/Shard in a collection
up or not in the mentioned diagram.
http://lucene.472066.n3.nabble.com/file/n4156902/cloud-graph.png
Our production environment doesn't
You need to also verify the node hosting the replica is a live node
(/live_nodes). From SolrJ, you can call:
clusterState.getLiveNodes().contains(node).
As for API, there is CLUSTERSTATE provided by the Collection API, but
it's not consulting /live_nodes (which is a bug) - I'll open a ticket.
On
https://issues.apache.org/jira/browse/SOLR-6481
On Thu, Sep 4, 2014 at 12:32 PM, Timothy Potter thelabd...@gmail.com wrote:
You need to also verify the node hosting the replica is a live node
(/live_nodes). From SolrJ, you can call:
clusterState.getLiveNodes().contains(node).
As for API,