I'm pretty interested in taking a stab at a Perl CPAN for SolrCloud that
is Zookeeper-aware; it's the least I can do for Solr as a non-Java
developer. :)
A quick question though: how would I write the shard logic to behave
similar to Java's Zookeeper-aware client? I'm able to get the hash/hex
needed for each shard from clusterstate.json, but how do I know which
field to hash on?
I'm guessing I also need to read the collection's schema.xml from
Zookeeper to get uniqueKey, and then use that for sharding, or does the
Java client take the sharding field as input? Looking for ideas here.
Thanks!
Tim
On 08/01/14 09:35 AM, Chris Hostetter wrote:
:> I couldn't find anyone which can connect to SolrCloud similar to SolrJ's
:> CloudSolrServer.
:
: Since I have a load balancer in front of 8 nodes, WebService::Solr[1] still
: works fine.
Right -- just because SolrJ is ZooKeeper aware doesn't mean you can *only*
talk to SolrCloud with SolrJ -- you can still use any HTTP client of your
choice to connect to your Solr nodes in a round robin fashion (or via a
load blancer) if you wish -- just like with a non SolrCloud deployment
using something like master/slave.
What you might want to consider, is taking a look at something like
Net::ZooKeeper to have a ZK aware perl client layer that could wrap
WebService::Solr.
-Hoss
http://www.lucidworks.com/