lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: SolrCloud use of "bootstrap_conf" versus "bootstrap_confdir"?
Date Fri, 18 May 2012 13:46:01 GMT
They are for two different purposes.

- bootstrap_confdir: you pass it a directory to upload to zk with an optional config name.
Any initial collections are automatically linked to this config set.

- bootstrap_conf: you pass it true and it reads solr.xml and uploads the conf set for each
SolrCore it finds, gives the conf set the name of the collection and associates each collection
with the same named config set.

So the first just lets you boot strap one collection easily...but what if you start with a
multi-core, multi-collection setup that you want to bootstrap into SolrCloud? And they don't
share a common config set? That's what the second command is for. You can setup 30 local SolrCores
in solr.xml and then just bootstrap all 30 different config sets up and have them fully linked
with each collection just by passing bootstrap_conf=true.


On May 18, 2012, at 8:56 AM, Eric Pugh wrote:

> I was writing some unit tests to setup a traditional Master/Slave environment as well
as a new SolrCloud based environment.  In playing around with code based on TestMultiCoreConfBootstrap,
I learned about the "bootstrap_conf" system property which bootstraps your current configuration
into ZK, and is a boolean, versus "bootstrap_confdir" which is a string passing the name of
the directory.
> 
> Are they both needed?  Seems like either both should always be there, or just bootstrap_confdir.
 It seemed just a bit confusing, and very magical.
> 
> Also, if you just use "bootstrap_conf", then the "collection.configName" parameter is
ignored, you always just get "collection1".   This is without a predefined set of cores in
solr.xml, which may make sense...?
> 
> 	  @Test
> 	  public void testMultiCoreConfBootstrap() throws Exception {
> //	    System.setProperty("bootstrap_conf", "true");
> 		System.setProperty("bootstrap_confdir",getSolrHome() + "/conf");
> 	    System.setProperty("collection.configName","leads");
> 	    cores = new CoreContainer(home, new File(home, "solr.xml"));
> 	    SolrZkClient zkclient = cores.getZkController().getZkClient();
> 	    // zkclient.printLayoutToStdOut();
> 	    
> 	    assertTrue(zkclient.exists("/configs/leads/solrconfig.xml", true));
> 	    assertTrue(zkclient.exists("/configs/leads/schema.xml", true));
> //	    assertTrue(zkclient.exists("/configs/core0/solrconfig.xml", true));
> //	    assertTrue(zkclient.exists("/configs/core1/schema.xml", true));
> 	  }
> 
> Eric
> 
> -----------------------------------------------------
> Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com
> Co-Author: Apache Solr 3 Enterprise Search Server available from http://www.packtpub.com/apache-solr-3-enterprise-search-server/book

> This e-mail and all contents, including attachments, is considered to be Company Confidential
unless explicitly stated otherwise, regardless of whether attachments are marked as such.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
> 

- Mark Miller
lucidimagination.com












---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message