Shubham Yelikar
Shubham Yelikar

Reputation: 93

How external zookeeper distribute's collections across multiple instances?

I have set up an external zookeeper ensemble and which is working fine. But i'm not able to figure out how zookeeper distribute's collections across multiple instances?is there any way so that we can specify how to distribute collection's across multiple machine's?

Upvotes: 1

Views: 36

Answers (1)

MatsLindh
MatsLindh

Reputation: 52832

It's not Zookeeper's responsibility on how to distribute collections, that's solely Solr's responsibility. Zookeeper only makes sure that the common files and their state are kept in sync across nodes.

You can tell Solr which nodes to create the collection and replicas on by giving the createNodeSet parameter when creating the collection through the Collection API:

createNodeSet

Allows defining the nodes to spread the new collection across. The format is a comma-separated list of node_names, such as localhost:8983_solr,localhost:8984_solr,localhost:8985_solr.

If not provided, the CREATE operation will create shard-replicas spread across all live Solr nodes.

Alternatively, use the special value of EMPTY to initially create no shard-replica within the new collection and then later use the ADDREPLICA operation to add shard-replicas when and where required.

Upvotes: 3

Related Questions