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 Pranaya Behera <be...@gmail.com> on 2019/10/31 08:36:31 UTC

Autoscaling in 8.2

Hi,
     I have one node started with solrcloud. I have created one collection
with the default configsets. When I am creating another node joining the
same cluster i.e. zookeeper chroot, is there any way to create the
collection ? Currently it is just sitting idle, not doing any work.
In the documentation it is not mentioned about this. Only replicas and
shards.
While a new node joins the cluster, is there a way to propagate the
collection creation and later all the shards/replicas being created
accordingly?

-- 
Thanks & Regards
Pranaya PR Behera

Re: Autoscaling in 8.2

Posted by Jörn Franke <jo...@gmail.com>.
You can have replication policies if you don’t want to replicate manually, but automatically:

https://lucene.apache.org/solr/guide/7_1/solrcloud-autoscaling-auto-add-replicas.html


>> Am 31.10.2019 um 15:55 schrieb Pranaya Behera <be...@gmail.com>:
> So my setup is this:
> 1 node
> 1 collection (created via collection API)
> 1 shard
> 1 replica
> This node is connected to zookeeper.
> 
> Now let's say I added one more node to the zookeeper, this node is new,
> hence there won't be any collection created for me automatically. It is a
> barebane node i.e. connected to the same cluster. Is there a way to sync
> the data in node 2 which doesn't have a collection as it is joined recently
> and also no collection has been created.
> 
>> On Thu, 31 Oct, 2019, 5:58 PM Jörn Franke, <jo...@gmail.com> wrote:
>> 
>> You need to create a replica of the collection on the  other node:
>> 
>> https://lucene.apache.org/solr/guide/6_6/collections-api.html
>> 
>> See addreplica
>> 
>>>> Am 31.10.2019 um 09:46 schrieb Pranaya Behera <behera.pranaya@gmail.com
>>> :
>>> Hi,
>>>    I have one node started with solrcloud. I have created one collection
>>> with the default configsets. When I am creating another node joining the
>>> same cluster i.e. zookeeper chroot, is there any way to create the
>>> collection ? Currently it is just sitting idle, not doing any work.
>>> In the documentation it is not mentioned about this. Only replicas and
>>> shards.
>>> While a new node joins the cluster, is there a way to propagate the
>>> collection creation and later all the shards/replicas being created
>>> accordingly?
>>> --
>>> Thanks & Regards
>>> Pranaya PR Behera

Re: Autoscaling in 8.2

Posted by Erick Erickson <er...@gmail.com>.
So you want the new node to host some part of the original collection, right?

use the Collections API ADDREPLICA or MOVEREPLICA commands is the easiest.

Best,
Erick

> On Oct 31, 2019, at 10:55 AM, Pranaya Behera <be...@gmail.com> wrote:
> 
> So my setup is this:
> 1 node
> 1 collection (created via collection API)
> 1 shard
> 1 replica
> This node is connected to zookeeper.
> 
> Now let's say I added one more node to the zookeeper, this node is new,
> hence there won't be any collection created for me automatically. It is a
> barebane node i.e. connected to the same cluster. Is there a way to sync
> the data in node 2 which doesn't have a collection as it is joined recently
> and also no collection has been created.
> 
> On Thu, 31 Oct, 2019, 5:58 PM Jörn Franke, <jo...@gmail.com> wrote:
> 
>> You need to create a replica of the collection on the  other node:
>> 
>> https://lucene.apache.org/solr/guide/6_6/collections-api.html
>> 
>> See addreplica
>> 
>>>> Am 31.10.2019 um 09:46 schrieb Pranaya Behera <behera.pranaya@gmail.com
>>> :
>>> Hi,
>>>    I have one node started with solrcloud. I have created one collection
>>> with the default configsets. When I am creating another node joining the
>>> same cluster i.e. zookeeper chroot, is there any way to create the
>>> collection ? Currently it is just sitting idle, not doing any work.
>>> In the documentation it is not mentioned about this. Only replicas and
>>> shards.
>>> While a new node joins the cluster, is there a way to propagate the
>>> collection creation and later all the shards/replicas being created
>>> accordingly?
>>> 
>>> --
>>> Thanks & Regards
>>> Pranaya PR Behera
>> 


Re: Autoscaling in 8.2

Posted by Pranaya Behera <be...@gmail.com>.
So my setup is this:
1 node
1 collection (created via collection API)
1 shard
1 replica
This node is connected to zookeeper.

Now let's say I added one more node to the zookeeper, this node is new,
hence there won't be any collection created for me automatically. It is a
barebane node i.e. connected to the same cluster. Is there a way to sync
the data in node 2 which doesn't have a collection as it is joined recently
and also no collection has been created.

On Thu, 31 Oct, 2019, 5:58 PM Jörn Franke, <jo...@gmail.com> wrote:

> You need to create a replica of the collection on the  other node:
>
> https://lucene.apache.org/solr/guide/6_6/collections-api.html
>
> See addreplica
>
> >> Am 31.10.2019 um 09:46 schrieb Pranaya Behera <behera.pranaya@gmail.com
> >:
> > Hi,
> >     I have one node started with solrcloud. I have created one collection
> > with the default configsets. When I am creating another node joining the
> > same cluster i.e. zookeeper chroot, is there any way to create the
> > collection ? Currently it is just sitting idle, not doing any work.
> > In the documentation it is not mentioned about this. Only replicas and
> > shards.
> > While a new node joins the cluster, is there a way to propagate the
> > collection creation and later all the shards/replicas being created
> > accordingly?
> >
> > --
> > Thanks & Regards
> > Pranaya PR Behera
>

Re: Autoscaling in 8.2

Posted by Jörn Franke <jo...@gmail.com>.
You need to create a replica of the collection on the  other node:

https://lucene.apache.org/solr/guide/6_6/collections-api.html

See addreplica 

>> Am 31.10.2019 um 09:46 schrieb Pranaya Behera <be...@gmail.com>:
> Hi,
>     I have one node started with solrcloud. I have created one collection
> with the default configsets. When I am creating another node joining the
> same cluster i.e. zookeeper chroot, is there any way to create the
> collection ? Currently it is just sitting idle, not doing any work.
> In the documentation it is not mentioned about this. Only replicas and
> shards.
> While a new node joins the cluster, is there a way to propagate the
> collection creation and later all the shards/replicas being created
> accordingly?
> 
> -- 
> Thanks & Regards
> Pranaya PR Behera

Re: Autoscaling in 8.2

Posted by Erick Erickson <er...@gmail.com>.
I really don’t understand the question. If you’ve created a new collection, presumably it’s got a different name, correct? So you need to send some documents to that collection and then query it for it to “do any work”.

I.e. 
http://localhost:8983/solr/original_collection/update….
http://localhost:8983/solr/original_collection/query….

.vs.
http://localhost:8983/solr/new_collection/update…..
http://localhost:8983/solr/new_collection/query….


> On Oct 31, 2019, at 4:36 AM, Pranaya Behera <be...@gmail.com> wrote:
> 
> Hi,
>     I have one node started with solrcloud. I have created one collection
> with the default configsets. When I am creating another node joining the
> same cluster i.e. zookeeper chroot, is there any way to create the
> collection ? Currently it is just sitting idle, not doing any work.
> In the documentation it is not mentioned about this. Only replicas and
> shards.
> While a new node joins the cluster, is there a way to propagate the
> collection creation and later all the shards/replicas being created
> accordingly?
> 
> -- 
> Thanks & Regards
> Pranaya PR Behera