You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Eric Pugh <ep...@opensourceconnections.com> on 2012/05/18 14:56:24 UTC

SolrCloud use of "bootstrap_conf" versus "bootstrap_confdir"?

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


Re: SolrCloud use of "bootstrap_conf" versus "bootstrap_confdir"?

Posted by Mark Miller <ma...@gmail.com>.
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