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 hangu choi <de...@gmail.com> on 2015/10/20 08:15:16 UTC

[newbie] Configuration for SolrCloud + DataImportHandler

Hi,

I am trying to start SolrCloud with embedded ZooKeeper.

I know how to config solrconfig.xml and schema.xml, and other things for
data import handler.
but when I trying to config it with solrCloud, I don't know where to start.

I know there is no conf directory in SolrCloud because conf directory are
stored in ZooKeeper.
Then, how can I config that? I read this (
https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files
)
but I failed to understand.

I need to config solrconfig.xml and schema.xml for my custom schema.


Regards,
Hangu

Re: [newbie] Configuration for SolrCloud + DataImportHandler

Posted by Erick Erickson <er...@gmail.com>.
Hmmm, not entirely sure. It's perfectly reasonable to use the core
admin API, just
be careful with it especially for things like reload, it's pretty easy
to have your cluster
in an inconsistent state.

Looks like the collections RELOAD command sends requests out all
replicas at once.

Under the covers, though, it just calls the core admin API (with the
correct parameters)
to carry out whatever is required. There's no intrinsic reason you
can't do this yourself
for each and every replica, you just have to insure that you get them _all_.

FWIW

On Wed, Oct 21, 2015 at 9:00 AM, Walter Underwood <wu...@wunderwood.org> wrote:
> Does the collection reload do a rolling reload of each node or does it do them all at once? We were planning on using the core reload on each system, one at a time. That would make sure the collection stays available.
>
> I read the documentation, it didn’t say anything about that.
>
> wunder
> Walter Underwood
> wunder@wunderwood.org
> http://observer.wunderwood.org/  (my blog)
>
>
>> On Oct 21, 2015, at 8:36 AM, Erick Erickson <er...@gmail.com> wrote:
>>
>> Please be very careful using the core admin UI for anything related to
>> SolrCloud. In fact, I try to avoid using it at all.
>>
>> The reason is that it is very low-level, and it is very easy to use it
>> incorrectly. For instance, reloading a core in a multi-replica setup
>> (doesnt matter whether it's several shards or just a single shard with
>> multiple replicas) will reload _only_ that core, leaving the other
>> replicas in your collection with the old configs.
>>
>> Always use the collections API if at all possible, see:
>> https://cwiki.apache.org/confluence/display/solr/Collections+API
>>
>> Best,
>> Erick
>>
>> On Wed, Oct 21, 2015 at 1:02 AM, Hangu Choi <de...@gmail.com> wrote:
>>> Mikhail,
>>> I solved the problem, I putfile to wrong path. /synonyms.txt  should be
>>> /configs/gettingstarted/synonyms.txt .
>>>
>>>
>>> Regards,
>>> Hangu
>>>
>>> On Wed, Oct 21, 2015 at 4:17 PM, Hangu Choi <de...@gmail.com> wrote:
>>>
>>>> Mikhail,
>>>>
>>>> I didn't understatnd that's what I need to do. thank you.
>>>>
>>>> but at the first moment, I am not doing well..
>>>> I am testing to change configuration in solrcloud, through this command
>>>>
>>>> ./zkcli.sh -zkhost localhost:9983 -cmd putfile /synonyms.txt
>>>> /usr/local/solr-5.3.1-test/server/scripts/cloud-scripts/synonyms.txt
>>>> and no error message was occured.
>>>>
>>>> and then I reloaded solr at localhost:8983 coreAdmin.
>>>> then I checked synonyms.txt file at localhost:8983/solr/#/~cloud?view=tree
>>>> but nothing happend. what's wrong?
>>>>
>>>>
>>>>
>>>>
>>>> Regards,
>>>> Hangu
>>>>
>>>> On Tue, Oct 20, 2015 at 9:18 PM, Mikhail Khludnev <
>>>> mkhludnev@griddynamics.com> wrote:
>>>>
>>>>> did you try something like
>>>>> $> zkcli.sh -zkhost localhost:2181 -cmd putfile /solr.xml
>>>>> /path/to/solr.xml
>>>>> ?
>>>>>
>>>>> On Mon, Oct 19, 2015 at 11:15 PM, hangu choi <de...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am trying to start SolrCloud with embedded ZooKeeper.
>>>>>>
>>>>>> I know how to config solrconfig.xml and schema.xml, and other things for
>>>>>> data import handler.
>>>>>> but when I trying to config it with solrCloud, I don't know where to
>>>>> start.
>>>>>>
>>>>>> I know there is no conf directory in SolrCloud because conf directory
>>>>> are
>>>>>> stored in ZooKeeper.
>>>>>> Then, how can I config that? I read this (
>>>>>>
>>>>>>
>>>>> https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files
>>>>>> )
>>>>>> but I failed to understand.
>>>>>>
>>>>>> I need to config solrconfig.xml and schema.xml for my custom schema.
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>> Hangu
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sincerely yours
>>>>> Mikhail Khludnev
>>>>> Principal Engineer,
>>>>> Grid Dynamics
>>>>>
>>>>> <http://www.griddynamics.com>
>>>>> <mk...@griddynamics.com>
>>>>>
>>>>
>>>>
>

Re: [newbie] Configuration for SolrCloud + DataImportHandler

Posted by Walter Underwood <wu...@wunderwood.org>.
Does the collection reload do a rolling reload of each node or does it do them all at once? We were planning on using the core reload on each system, one at a time. That would make sure the collection stays available.

I read the documentation, it didn’t say anything about that.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Oct 21, 2015, at 8:36 AM, Erick Erickson <er...@gmail.com> wrote:
> 
> Please be very careful using the core admin UI for anything related to
> SolrCloud. In fact, I try to avoid using it at all.
> 
> The reason is that it is very low-level, and it is very easy to use it
> incorrectly. For instance, reloading a core in a multi-replica setup
> (doesnt matter whether it's several shards or just a single shard with
> multiple replicas) will reload _only_ that core, leaving the other
> replicas in your collection with the old configs.
> 
> Always use the collections API if at all possible, see:
> https://cwiki.apache.org/confluence/display/solr/Collections+API
> 
> Best,
> Erick
> 
> On Wed, Oct 21, 2015 at 1:02 AM, Hangu Choi <de...@gmail.com> wrote:
>> Mikhail,
>> I solved the problem, I putfile to wrong path. /synonyms.txt  should be
>> /configs/gettingstarted/synonyms.txt .
>> 
>> 
>> Regards,
>> Hangu
>> 
>> On Wed, Oct 21, 2015 at 4:17 PM, Hangu Choi <de...@gmail.com> wrote:
>> 
>>> Mikhail,
>>> 
>>> I didn't understatnd that's what I need to do. thank you.
>>> 
>>> but at the first moment, I am not doing well..
>>> I am testing to change configuration in solrcloud, through this command
>>> 
>>> ./zkcli.sh -zkhost localhost:9983 -cmd putfile /synonyms.txt
>>> /usr/local/solr-5.3.1-test/server/scripts/cloud-scripts/synonyms.txt
>>> and no error message was occured.
>>> 
>>> and then I reloaded solr at localhost:8983 coreAdmin.
>>> then I checked synonyms.txt file at localhost:8983/solr/#/~cloud?view=tree
>>> but nothing happend. what's wrong?
>>> 
>>> 
>>> 
>>> 
>>> Regards,
>>> Hangu
>>> 
>>> On Tue, Oct 20, 2015 at 9:18 PM, Mikhail Khludnev <
>>> mkhludnev@griddynamics.com> wrote:
>>> 
>>>> did you try something like
>>>> $> zkcli.sh -zkhost localhost:2181 -cmd putfile /solr.xml
>>>> /path/to/solr.xml
>>>> ?
>>>> 
>>>> On Mon, Oct 19, 2015 at 11:15 PM, hangu choi <de...@gmail.com> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> I am trying to start SolrCloud with embedded ZooKeeper.
>>>>> 
>>>>> I know how to config solrconfig.xml and schema.xml, and other things for
>>>>> data import handler.
>>>>> but when I trying to config it with solrCloud, I don't know where to
>>>> start.
>>>>> 
>>>>> I know there is no conf directory in SolrCloud because conf directory
>>>> are
>>>>> stored in ZooKeeper.
>>>>> Then, how can I config that? I read this (
>>>>> 
>>>>> 
>>>> https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files
>>>>> )
>>>>> but I failed to understand.
>>>>> 
>>>>> I need to config solrconfig.xml and schema.xml for my custom schema.
>>>>> 
>>>>> 
>>>>> Regards,
>>>>> Hangu
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Sincerely yours
>>>> Mikhail Khludnev
>>>> Principal Engineer,
>>>> Grid Dynamics
>>>> 
>>>> <http://www.griddynamics.com>
>>>> <mk...@griddynamics.com>
>>>> 
>>> 
>>> 


Re: [newbie] Configuration for SolrCloud + DataImportHandler

Posted by Erick Erickson <er...@gmail.com>.
Please be very careful using the core admin UI for anything related to
SolrCloud. In fact, I try to avoid using it at all.

The reason is that it is very low-level, and it is very easy to use it
incorrectly. For instance, reloading a core in a multi-replica setup
(doesnt matter whether it's several shards or just a single shard with
multiple replicas) will reload _only_ that core, leaving the other
replicas in your collection with the old configs.

Always use the collections API if at all possible, see:
https://cwiki.apache.org/confluence/display/solr/Collections+API

Best,
Erick

On Wed, Oct 21, 2015 at 1:02 AM, Hangu Choi <de...@gmail.com> wrote:
> Mikhail,
> I solved the problem, I putfile to wrong path. /synonyms.txt  should be
> /configs/gettingstarted/synonyms.txt .
>
>
> Regards,
> Hangu
>
> On Wed, Oct 21, 2015 at 4:17 PM, Hangu Choi <de...@gmail.com> wrote:
>
>> Mikhail,
>>
>> I didn't understatnd that's what I need to do. thank you.
>>
>> but at the first moment, I am not doing well..
>> I am testing to change configuration in solrcloud, through this command
>>
>> ./zkcli.sh -zkhost localhost:9983 -cmd putfile /synonyms.txt
>> /usr/local/solr-5.3.1-test/server/scripts/cloud-scripts/synonyms.txt
>> and no error message was occured.
>>
>> and then I reloaded solr at localhost:8983 coreAdmin.
>> then I checked synonyms.txt file at localhost:8983/solr/#/~cloud?view=tree
>> but nothing happend. what's wrong?
>>
>>
>>
>>
>> Regards,
>> Hangu
>>
>> On Tue, Oct 20, 2015 at 9:18 PM, Mikhail Khludnev <
>> mkhludnev@griddynamics.com> wrote:
>>
>>> did you try something like
>>> $> zkcli.sh -zkhost localhost:2181 -cmd putfile /solr.xml
>>> /path/to/solr.xml
>>> ?
>>>
>>> On Mon, Oct 19, 2015 at 11:15 PM, hangu choi <de...@gmail.com> wrote:
>>>
>>> > Hi,
>>> >
>>> > I am trying to start SolrCloud with embedded ZooKeeper.
>>> >
>>> > I know how to config solrconfig.xml and schema.xml, and other things for
>>> > data import handler.
>>> > but when I trying to config it with solrCloud, I don't know where to
>>> start.
>>> >
>>> > I know there is no conf directory in SolrCloud because conf directory
>>> are
>>> > stored in ZooKeeper.
>>> > Then, how can I config that? I read this (
>>> >
>>> >
>>> https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files
>>> > )
>>> > but I failed to understand.
>>> >
>>> > I need to config solrconfig.xml and schema.xml for my custom schema.
>>> >
>>> >
>>> > Regards,
>>> > Hangu
>>> >
>>>
>>>
>>>
>>> --
>>> Sincerely yours
>>> Mikhail Khludnev
>>> Principal Engineer,
>>> Grid Dynamics
>>>
>>> <http://www.griddynamics.com>
>>> <mk...@griddynamics.com>
>>>
>>
>>

Re: [newbie] Configuration for SolrCloud + DataImportHandler

Posted by Hangu Choi <de...@gmail.com>.
Mikhail,
I solved the problem, I putfile to wrong path. /synonyms.txt  should be
/configs/gettingstarted/synonyms.txt .


Regards,
Hangu

On Wed, Oct 21, 2015 at 4:17 PM, Hangu Choi <de...@gmail.com> wrote:

> Mikhail,
>
> I didn't understatnd that's what I need to do. thank you.
>
> but at the first moment, I am not doing well..
> I am testing to change configuration in solrcloud, through this command
>
> ./zkcli.sh -zkhost localhost:9983 -cmd putfile /synonyms.txt
> /usr/local/solr-5.3.1-test/server/scripts/cloud-scripts/synonyms.txt
> and no error message was occured.
>
> and then I reloaded solr at localhost:8983 coreAdmin.
> then I checked synonyms.txt file at localhost:8983/solr/#/~cloud?view=tree
> but nothing happend. what's wrong?
>
>
>
>
> Regards,
> Hangu
>
> On Tue, Oct 20, 2015 at 9:18 PM, Mikhail Khludnev <
> mkhludnev@griddynamics.com> wrote:
>
>> did you try something like
>> $> zkcli.sh -zkhost localhost:2181 -cmd putfile /solr.xml
>> /path/to/solr.xml
>> ?
>>
>> On Mon, Oct 19, 2015 at 11:15 PM, hangu choi <de...@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > I am trying to start SolrCloud with embedded ZooKeeper.
>> >
>> > I know how to config solrconfig.xml and schema.xml, and other things for
>> > data import handler.
>> > but when I trying to config it with solrCloud, I don't know where to
>> start.
>> >
>> > I know there is no conf directory in SolrCloud because conf directory
>> are
>> > stored in ZooKeeper.
>> > Then, how can I config that? I read this (
>> >
>> >
>> https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files
>> > )
>> > but I failed to understand.
>> >
>> > I need to config solrconfig.xml and schema.xml for my custom schema.
>> >
>> >
>> > Regards,
>> > Hangu
>> >
>>
>>
>>
>> --
>> Sincerely yours
>> Mikhail Khludnev
>> Principal Engineer,
>> Grid Dynamics
>>
>> <http://www.griddynamics.com>
>> <mk...@griddynamics.com>
>>
>
>

Re: [newbie] Configuration for SolrCloud + DataImportHandler

Posted by Hangu Choi <de...@gmail.com>.
Mikhail,

I didn't understatnd that's what I need to do. thank you.

but at the first moment, I am not doing well..
I am testing to change configuration in solrcloud, through this command

./zkcli.sh -zkhost localhost:9983 -cmd putfile /synonyms.txt
/usr/local/solr-5.3.1-test/server/scripts/cloud-scripts/synonyms.txt
and no error message was occured.

and then I reloaded solr at localhost:8983 coreAdmin.
then I checked synonyms.txt file at localhost:8983/solr/#/~cloud?view=tree
but nothing happend. what's wrong?




Regards,
Hangu

On Tue, Oct 20, 2015 at 9:18 PM, Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:

> did you try something like
> $> zkcli.sh -zkhost localhost:2181 -cmd putfile /solr.xml /path/to/solr.xml
> ?
>
> On Mon, Oct 19, 2015 at 11:15 PM, hangu choi <de...@gmail.com> wrote:
>
> > Hi,
> >
> > I am trying to start SolrCloud with embedded ZooKeeper.
> >
> > I know how to config solrconfig.xml and schema.xml, and other things for
> > data import handler.
> > but when I trying to config it with solrCloud, I don't know where to
> start.
> >
> > I know there is no conf directory in SolrCloud because conf directory are
> > stored in ZooKeeper.
> > Then, how can I config that? I read this (
> >
> >
> https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files
> > )
> > but I failed to understand.
> >
> > I need to config solrconfig.xml and schema.xml for my custom schema.
> >
> >
> > Regards,
> > Hangu
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>

Re: [newbie] Configuration for SolrCloud + DataImportHandler

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
did you try something like
$> zkcli.sh -zkhost localhost:2181 -cmd putfile /solr.xml /path/to/solr.xml
?

On Mon, Oct 19, 2015 at 11:15 PM, hangu choi <de...@gmail.com> wrote:

> Hi,
>
> I am trying to start SolrCloud with embedded ZooKeeper.
>
> I know how to config solrconfig.xml and schema.xml, and other things for
> data import handler.
> but when I trying to config it with solrCloud, I don't know where to start.
>
> I know there is no conf directory in SolrCloud because conf directory are
> stored in ZooKeeper.
> Then, how can I config that? I read this (
>
> https://cwiki.apache.org/confluence/display/solr/Using+ZooKeeper+to+Manage+Configuration+Files
> )
> but I failed to understand.
>
> I need to config solrconfig.xml and schema.xml for my custom schema.
>
>
> Regards,
> Hangu
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>