lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per Steffensen <st...@designware.dk>
Subject Re: Adding config to SolrCloud without creating any shards/slices
Date Fri, 18 May 2012 07:06:00 GMT
First of all, sorry about the subject of this discussion. It should have 
been something like "Adding config to SolrCloud without starting a Solr 
server"

Mark Miller skrev:
> k
> On May 16, 2012, at 5:35 AM, Per Steffensen wrote:
>
>   
>> Hi
>>
>> We want to create a Solr config in ZK during installation of our product, but we
dont want to create any shards in that phase. We will create shards from our application when
it starts up and also automatically maintain the set of shards from our application (which
uses SolrCloud). The only way we know to create a Solr config in ZK is to spin up a  Solr
with  system properties zkHost, bootstrap_confdir and collection.configName. Is there another,
more API-ish, way of creating a Solr config in ZK?
>>
>> Regards, Per Steffensen
>>     
>
> I've started some work on this, but I have not finished.
>
> There is a main method in ZkController that has some initial code. Currently it just
lets you upload a specifically named config set directory - I would also like to add the same
multi core config set upload option we have on startup - where it reads solr.xml, finds all
the config dirs and uploads them, and links each collection to a config set named after it.
>   
Yeah ok, I just want the config created - no shards/slices/collections.
> Technically, you could use any tool to set this up - there are a variety of options in
the zk world - you just have to place the config files under the right node.
I would really want to do it through Solr. This is the correct way, I 
think. So that, when you change your "strategy" e.g. location or format 
of configs in ZK, I will automatically inherit that.
>  There is one other tricky part though - the collection has to be set to the right config
set name. This is specified on the collection node in ZooKeeper. When creating a new collection,
you can specify this as a param. If none is set and there is only one config set, that one
config set is used. However, some link must be made, and it is not done automatically with
your initial collections in solr.xml unless there is only one config set.
>   
I know about that, and will use Solr to create collections. I just want 
the config established in ZK before that, and not create the config 
"during the process of creating a collection".
> So now I'm thinking perhaps we should default the config set name to the collection name.
Then if you simply use the collection name initially when you upload the set, no new linking
is needed. If you don't like that, you can explicitly override what config set to use. Convention
would be to name your config sets after your collection name, but extra work would allow you
to do whatever you want.
>   
I want several collections to use the same config, so I would have to do 
that extra work.
> You can find an example of the ZkContoller main method being used in solr/cloud-dev scripts.
The one caveat is that we pass an extra param to solrhome and briefly run a ZkServer within
the ZkController#main method since we don't have an external ensemble. Normally this would
not make sense and you would want to leave that out. I need to clean this all up (the ZkController
params) and document it on the wiki as soon as I make these couple tweaks though.
>   
Ok

Thanks, Mark
> - Mark Miller
> lucidimagination.com
>   

Regards, Per Steffensen
>
>
>
>
>
>
>
>
>
>
>
>   


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message