lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Automate startup/shutdown of SolrCloud Shards
Date Mon, 03 Oct 2011 05:20:59 GMT
I could use an easier way to do this myself:
https://issues.apache.org/jira/browse/SOLR-2805

I'm going to add a main method to ZkController that will make this simpler -
I've got an early version that works something like: java -classpath .:*
org.apache.solr.cloud.ZkController 127.0.0.1:9983 127.0.0.1 8983 solr
/home/mark/workspace/SolrCloud/solr/example/solr/conf conf1


On Fri, Sep 30, 2011 at 3:13 PM, Mark Miller <markrmiller@gmail.com> wrote:

>
> On Sep 29, 2011, at 1:59 PM, Jamie Johnson wrote:
>
> > I am trying to automate the startup/shutdown of SolrCloud shards and
> > have noticed that there is a bit of a timing issue where if the server
> > which is to bootstrap ZK with the configs does not complete it's
> > process (i.e. there is no data at the Conf yet) the other servers will
> > fail to start.  An obvious solution is to just start the solr instance
> > responsible for bootstraping first, is there some way that folks are
> > handling this now?
>
>
> That's pretty much the deal - you have to get the configs in there for the
> other shards to use as step one.
>
> Normally you would do this by starting one shard first, pointing to the
> configs. Then start the other shards.
>
> Other options:
>
> use the zk cmd line program to manually create the config nodes and upload
> the files
> use the GUI program out there to do the same
> use the zk library to write up something that does it
>
> write a simple java program (you'll need the solr libs on the classpath)
> that does it with ZkController
>
> eg
>
> ZkController  zkController = new ZkController(zkAddress,
>          zkClientTimeout, zkConnectTimeout, "localhost", "8983", "solr")
> zkController.uploadConfigDir(directory, configName);
> zkController.close();
>
> - Mark Miller
> lucidimagination.com
> 2011.lucene-eurocon.org | Oct 17-20 | Barcelona
>
>
>
>
>
>
>
>
>
>
>


-- 
- Mark

http://www.lucidimagination.com

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