You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Lee Chunki <lc...@coupang.com> on 2014/09/03 06:00:04 UTC

How can I set shard members?

Hi,

I am trying to test Solr Cloud with version 4.1.0.
(  http://wiki.apache.org/solr/SolrCloud#Example_C:_Two_shard_cluster_with_shard_replicas_and_zookeeper_ensemble )

Is there any way set shard & shard member ?

for example.
server1, server2 for shard1
server3, server4 for shard2

when I tested the example, shard member depend on running Solr order.
i.e. run server1 -> server2 -> server3 -> server4 then server1, 3 are shard1 and server 2,4 are shard2
of course, from second time there is no dependency of running Solr order.

and I tried "-DshardId=shard1” but it is not working.

Thanks,
Chunki.

Re: How can I set shard members?

Posted by Erick Erickson <er...@gmail.com>.
Take a look here:
http://heliosearch.org/solrcloud-assigning-nodes-machines/

If you really, really, really require that shard1 be on server1 and
_not_ server 3 I'm not quite sure how you'd do it. But if you want
your leaders on servers 1 and 3, just use the nodeset. (Jürgen beat me
to it!).

Best
Erick

On Tue, Sep 2, 2014 at 9:00 PM, Lee Chunki <lc...@coupang.com> wrote:
> Hi,
>
> I am trying to test Solr Cloud with version 4.1.0.
> (  http://wiki.apache.org/solr/SolrCloud#Example_C:_Two_shard_cluster_with_shard_replicas_and_zookeeper_ensemble )
>
> Is there any way set shard & shard member ?
>
> for example.
> server1, server2 for shard1
> server3, server4 for shard2
>
> when I tested the example, shard member depend on running Solr order.
> i.e. run server1 -> server2 -> server3 -> server4 then server1, 3 are shard1 and server 2,4 are shard2
> of course, from second time there is no dependency of running Solr order.
>
> and I tried "-DshardId=shard1” but it is not working.
>
> Thanks,
> Chunki.

Re: How can I set shard members?

Posted by "Jürgen Wagner (DVT)" <ju...@devoteam.com>.
Hello,
  have you tried the "createNodeSet" option of collection/shard creation
and the "node" option of replica creation in Solr 4.9.0+?
As you're just testing, I would strongly recommend going to the latest
version.

https://cwiki.apache.org/confluence/display/solr/Collections+API

This is useful to provide underlying topology information. We use this
in customer scenarios to partition the set of servers into at least two
groups, so all shards of a SolrCloud cluster will have replica X of a
shard located in server group X (usually, X = 2). The two server groups
then correspond to two separate physical ESX clusters, so if one VM
cluster goes down, at least one replica of each shard will still be
available.

Cheers,
--Jürgen


On 03.09.2014 06:00, Lee Chunki wrote:
> Hi,
>
> I am trying to test Solr Cloud with version 4.1.0.
> (  http://wiki.apache.org/solr/SolrCloud#Example_C:_Two_shard_cluster_with_shard_replicas_and_zookeeper_ensemble )
>
> Is there any way set shard & shard member ?
>
> for example.
> server1, server2 for shard1
> server3, server4 for shard2
>
> when I tested the example, shard member depend on running Solr order.
> i.e. run server1 -> server2 -> server3 -> server4 then server1, 3 are shard1 and server 2,4 are shard2
> of course, from second time there is no dependency of running Solr order.
>
> and I tried "-DshardId=shard1” but it is not working.
>
> Thanks,
> Chunki.