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 Nitin Solanki <ni...@gmail.com> on 2015/03/23 11:51:05 UTC

How to deal with different configurations on different collection?

Hello,
           Few days before, I have created a collection (wikingram) in solr
4.10.4(Solr cloud) by applying default configuration from collection1.

*sudo /mnt/nitin/Solr/solr_lm/example/scripts/cloud-scripts/zkcli.sh
-zkhost localhost:9983 -cmd upconfig -confdir
/mnt/nitin/Solr/solr_lm/example/solr/collection1/conf -confname default*

Now, I want to create another collection (wikingram2) which needs different
configuration. How can I do that?
How to deal with different configuration on different collections.

*Scenario: *
{
"wikingram" : "myconf1",
"wikingram2" : "myconf2"
}

How to set the configuration just like above ?

I don't have much idea about that..
Any help please?

Re: How to deal with different configurations on different collection?

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/23/2015 7:19 AM, Nitin Solanki wrote:
> Thanks Shawn. It is working now as you said..  No need to switch to
> external zookeeper. It is also working in embedded zookeeper

Failures happen.  This is a reality of computer systems, and planning
for that failure is absolutely critical.  We can put a fair amount of
redundancy (multiple power supplies, multiple disks) in a single
machine, but it can still fail.

If the machine where you have embedded zookeeper fails, your entire
cloud is going to effectively go down, even if all the rest of your Solr
servers are still running.  It might still be possible to make queries,
but even if that's the case, you won't be able to update the index, and
if one of those remaining Solr instances were to stop, it would not
start up correctly without zookeeper.

A fault tolerant zookeeper ensemble consists of at least three machines,
and you need at least two machines for fault tolerance of Solr itself. 
That hardware can overlap, so a minimum of three servers is required for
redundancy.

You can't use only two machines for zookeeper, because you must have a
majority of the total number of servers up and running in order to form
a majority vote, and one of two doesn't qualify.  It's best if there is
an odd number ... if you have four total machines, a majority vote
requires three, so your fault tolerance is the same as with three machines.

Additionally, if zookeeper is not its own process, then the zookeeper
instance will stop whenever you stop that Solr instance.  That is
disruptive.

Thanks,
Shawn


Re: How to deal with different configurations on different collection?

Posted by Nitin Solanki <ni...@gmail.com>.
Thanks Shawn. It is working now as you said..  No need to switch to
external zookeeper. It is also working in embedded zookeeper

On Mon, Mar 23, 2015 at 5:42 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 3/23/2015 4:51 AM, Nitin Solanki wrote:
> >            Few days before, I have created a collection (wikingram) in
> solr
> > 4.10.4(Solr cloud) by applying default configuration from collection1.
> >
> > *sudo /mnt/nitin/Solr/solr_lm/example/scripts/cloud-scripts/zkcli.sh
> > -zkhost localhost:9983 -cmd upconfig -confdir
> > /mnt/nitin/Solr/solr_lm/example/solr/collection1/conf -confname default*
> >
> > Now, I want to create another collection (wikingram2) which needs
> different
> > configuration. How can I do that?
> > How to deal with different configuration on different collections.
> >
> > *Scenario: *
> > {
> > "wikingram" : "myconf1",
> > "wikingram2" : "myconf2"
> > }
> >
> > How to set the configuration just like above ?
>
> The "upconfig" command that you executed has uploaded a config named
> "default" (because of the "-confname default" parameters).
>
> To do what you want, simply repeat the upconfig command with another
> configuration directory and "-confname myconf2", then use that
> configName when you call the Collections API to create the second
> collection.
>
> I notice you're using the embedded zookeeper.  You're going to want to
> switch to an external zookeeper ensemble with at least three hosts
> before you go into production.
>
> Thanks,
> Shawn
>
>

Re: How to deal with different configurations on different collection?

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/23/2015 4:51 AM, Nitin Solanki wrote:
>            Few days before, I have created a collection (wikingram) in solr
> 4.10.4(Solr cloud) by applying default configuration from collection1.
> 
> *sudo /mnt/nitin/Solr/solr_lm/example/scripts/cloud-scripts/zkcli.sh
> -zkhost localhost:9983 -cmd upconfig -confdir
> /mnt/nitin/Solr/solr_lm/example/solr/collection1/conf -confname default*
> 
> Now, I want to create another collection (wikingram2) which needs different
> configuration. How can I do that?
> How to deal with different configuration on different collections.
> 
> *Scenario: *
> {
> "wikingram" : "myconf1",
> "wikingram2" : "myconf2"
> }
> 
> How to set the configuration just like above ?

The "upconfig" command that you executed has uploaded a config named
"default" (because of the "-confname default" parameters).

To do what you want, simply repeat the upconfig command with another
configuration directory and "-confname myconf2", then use that
configName when you call the Collections API to create the second
collection.

I notice you're using the embedded zookeeper.  You're going to want to
switch to an external zookeeper ensemble with at least three hosts
before you go into production.

Thanks,
Shawn