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 Ritesh Sinha <ku...@gmail.com> on 2015/09/08 16:42:10 UTC

conf Folder is not getting created while creating a collection on solr cloud

I am trying to create a collection on Solr cloud.

I have created a 3 node zookeeper cluster on the same machine.

using this command to start solr on three ports :
bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
8983
bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
8984
bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
8985

running this to upload the configuration set to zookeeper before creating
the collection

/var/data/solr/solr-5.3.0/server/scripts/cloud-scripts/zkcli.sh -zkhost
localhost:2181,localhost:2182,localhost:2183 -cmd upconfig -confdir
/var/data/solr/solr-5.3.0/server/solr/configsets/data_driven_schema_configs/conf
-confname test_conf

command for creating collection
curl '
http://localhost:8983/solr/admin/collections?action=CREATE&name=tenlaz&numShards=1&replicationFactor=3&configName=test_collection&configName=test_conf
'

But when I check
solr-5.3.0/server/solr/test_collection_shard1_replica1/
There is no conf file.

I know i can explicitly copy it.

but is there any command which can automatically create the conf directory.

I know i am missing something.Any help is appreciated.

Reagrds

Re: conf Folder is not getting created while creating a collection on solr cloud

Posted by Ritesh Sinha <ku...@gmail.com>.
Yeah, I got the point. Thanks a lot guys.
@eric
@edwin

On Tue, Sep 8, 2015 at 10:14 PM, Erick Erickson <er...@gmail.com>
wrote:

> When you create a collection, you specify a "configset" via the
> collection.configName
> parameter _or_ it's the same name as your collection and already uploaded
> _or_ it's the only configset up in ZK.
>
> Anyway, thereafter whenever a node starts up it downloads the configs
> from ZK. If
> the config directory was resident on the individual nodes, it'd be
> difficult to keep
> them all in sync.
>
> So the basic pattern is
> 1> you have some source of config files, often kept in a version control
> system
> or as Edwin says located in the distro.
> 2> you make whatever modifications you want
> 3> you push the configs up to Zookeeper with the zkCli tool
> 4> you use the configs (reload the collection using them, create a new
> collection, whatever)
>
> Repeat <2> and <3> whenever you need to change your configs.
>
> Best,
> Erick
>
> On Tue, Sep 8, 2015 at 8:31 AM, Zheng Lin Edwin Yeo
> <ed...@gmail.com> wrote:
> > There is no conf file located at
> > solr-5.3.0/server/solr/test_collection_shard1_replica1/.
> > Inside that folder should only contain data folder and core.properties
> file.
> > The conf folder is only in the solr-5.3.0/server/solr/data_
> > driven_schema_configs.
> >
> > Why do you need the conf file in
> > solr-5.3.0/server/solr/test_collection_shard1_replica1/?
> > This is where Solr stores the indexes (in data\index) and normally I
> don't
> > touch anything in this folder.
> >
> > Regards,
> > Edwin
> >
> >
> > On 8 September 2015 at 22:42, Ritesh Sinha <
> kumarriteshranjansinha@gmail.com
> >> wrote:
> >
> >> I am trying to create a collection on Solr cloud.
> >>
> >> I have created a 3 node zookeeper cluster on the same machine.
> >>
> >> using this command to start solr on three ports :
> >> bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
> >> 8983
> >> bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
> >> 8984
> >> bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
> >> 8985
> >>
> >> running this to upload the configuration set to zookeeper before
> creating
> >> the collection
> >>
> >> /var/data/solr/solr-5.3.0/server/scripts/cloud-scripts/zkcli.sh -zkhost
> >> localhost:2181,localhost:2182,localhost:2183 -cmd upconfig -confdir
> >>
> >>
> /var/data/solr/solr-5.3.0/server/solr/configsets/data_driven_schema_configs/conf
> >> -confname test_conf
> >>
> >> command for creating collection
> >> curl '
> >>
> >>
> http://localhost:8983/solr/admin/collections?action=CREATE&name=tenlaz&numShards=1&replicationFactor=3&configName=test_collection&configName=test_conf
> >> '
> >>
> >> But when I check
> >> solr-5.3.0/server/solr/test_collection_shard1_replica1/
> >> There is no conf file.
> >>
> >> I know i can explicitly copy it.
> >>
> >> but is there any command which can automatically create the conf
> directory.
> >>
> >> I know i am missing something.Any help is appreciated.
> >>
> >> Reagrds
> >>
>

Re: conf Folder is not getting created while creating a collection on solr cloud

Posted by Erick Erickson <er...@gmail.com>.
When you create a collection, you specify a "configset" via the
collection.configName
parameter _or_ it's the same name as your collection and already uploaded
_or_ it's the only configset up in ZK.

Anyway, thereafter whenever a node starts up it downloads the configs
from ZK. If
the config directory was resident on the individual nodes, it'd be
difficult to keep
them all in sync.

So the basic pattern is
1> you have some source of config files, often kept in a version control system
or as Edwin says located in the distro.
2> you make whatever modifications you want
3> you push the configs up to Zookeeper with the zkCli tool
4> you use the configs (reload the collection using them, create a new
collection, whatever)

Repeat <2> and <3> whenever you need to change your configs.

Best,
Erick

On Tue, Sep 8, 2015 at 8:31 AM, Zheng Lin Edwin Yeo
<ed...@gmail.com> wrote:
> There is no conf file located at
> solr-5.3.0/server/solr/test_collection_shard1_replica1/.
> Inside that folder should only contain data folder and core.properties file.
> The conf folder is only in the solr-5.3.0/server/solr/data_
> driven_schema_configs.
>
> Why do you need the conf file in
> solr-5.3.0/server/solr/test_collection_shard1_replica1/?
> This is where Solr stores the indexes (in data\index) and normally I don't
> touch anything in this folder.
>
> Regards,
> Edwin
>
>
> On 8 September 2015 at 22:42, Ritesh Sinha <kumarriteshranjansinha@gmail.com
>> wrote:
>
>> I am trying to create a collection on Solr cloud.
>>
>> I have created a 3 node zookeeper cluster on the same machine.
>>
>> using this command to start solr on three ports :
>> bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
>> 8983
>> bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
>> 8984
>> bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
>> 8985
>>
>> running this to upload the configuration set to zookeeper before creating
>> the collection
>>
>> /var/data/solr/solr-5.3.0/server/scripts/cloud-scripts/zkcli.sh -zkhost
>> localhost:2181,localhost:2182,localhost:2183 -cmd upconfig -confdir
>>
>> /var/data/solr/solr-5.3.0/server/solr/configsets/data_driven_schema_configs/conf
>> -confname test_conf
>>
>> command for creating collection
>> curl '
>>
>> http://localhost:8983/solr/admin/collections?action=CREATE&name=tenlaz&numShards=1&replicationFactor=3&configName=test_collection&configName=test_conf
>> '
>>
>> But when I check
>> solr-5.3.0/server/solr/test_collection_shard1_replica1/
>> There is no conf file.
>>
>> I know i can explicitly copy it.
>>
>> but is there any command which can automatically create the conf directory.
>>
>> I know i am missing something.Any help is appreciated.
>>
>> Reagrds
>>

Re: conf Folder is not getting created while creating a collection on solr cloud

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
There is no conf file located at
solr-5.3.0/server/solr/test_collection_shard1_replica1/.
Inside that folder should only contain data folder and core.properties file.
The conf folder is only in the solr-5.3.0/server/solr/data_
driven_schema_configs.

Why do you need the conf file in
solr-5.3.0/server/solr/test_collection_shard1_replica1/?
This is where Solr stores the indexes (in data\index) and normally I don't
touch anything in this folder.

Regards,
Edwin


On 8 September 2015 at 22:42, Ritesh Sinha <kumarriteshranjansinha@gmail.com
> wrote:

> I am trying to create a collection on Solr cloud.
>
> I have created a 3 node zookeeper cluster on the same machine.
>
> using this command to start solr on three ports :
> bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
> 8983
> bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
> 8984
> bin/solr start  cloud -z localhost:2181,localhost:2182,localhost:2183 -p
> 8985
>
> running this to upload the configuration set to zookeeper before creating
> the collection
>
> /var/data/solr/solr-5.3.0/server/scripts/cloud-scripts/zkcli.sh -zkhost
> localhost:2181,localhost:2182,localhost:2183 -cmd upconfig -confdir
>
> /var/data/solr/solr-5.3.0/server/solr/configsets/data_driven_schema_configs/conf
> -confname test_conf
>
> command for creating collection
> curl '
>
> http://localhost:8983/solr/admin/collections?action=CREATE&name=tenlaz&numShards=1&replicationFactor=3&configName=test_collection&configName=test_conf
> '
>
> But when I check
> solr-5.3.0/server/solr/test_collection_shard1_replica1/
> There is no conf file.
>
> I know i can explicitly copy it.
>
> but is there any command which can automatically create the conf directory.
>
> I know i am missing something.Any help is appreciated.
>
> Reagrds
>