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 Ravi Solr <ra...@gmail.com> on 2015/09/21 22:35:27 UTC

SolrCloud Startup question

Can somebody kindly help me understand the difference between the following
startup calls ?

./solr start -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181

Vs

./solr start -c -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181

What happens if i don't pass the "-c" option ?? I read the documentation
but got more confused, I do run a ZK ensemble of 3 instances.  FYI my cloud
seems to work fine and teh Admin UI shows Cloud graph just fine, but I want
to just make sure I am doing the right thing and not missing any nuance.

The following is form documention on cwiki.
---------------

"Start Solr in SolrCloud mode, which will also launch the embedded
ZooKeeper instance included with Solr.

This option can be shortened to simply -c.

If you are already running a ZooKeeper ensemble that you want to use
instead of the embedded (single-node) ZooKeeper, you should also pass the
-z parameter."

-----------------

Thanks

Ravi Kiran Bhaskar

Re: SolrCloud Startup question

Posted by Upayavira <uv...@odoko.co.uk>.
As it says below, -c enables a Zookeeper node within the same JVM as
Solr. You don't want that, as you already have an ensemble up and
running.

Upayavira

On Mon, Sep 21, 2015, at 09:35 PM, Ravi Solr wrote:
> Can somebody kindly help me understand the difference between the
> following
> startup calls ?
> 
> ./solr start -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
> 
> Vs
> 
> ./solr start -c -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
> 
> What happens if i don't pass the "-c" option ?? I read the documentation
> but got more confused, I do run a ZK ensemble of 3 instances.  FYI my
> cloud
> seems to work fine and teh Admin UI shows Cloud graph just fine, but I
> want
> to just make sure I am doing the right thing and not missing any nuance.
> 
> The following is form documention on cwiki.
> ---------------
> 
> "Start Solr in SolrCloud mode, which will also launch the embedded
> ZooKeeper instance included with Solr.
> 
> This option can be shortened to simply -c.
> 
> If you are already running a ZooKeeper ensemble that you want to use
> instead of the embedded (single-node) ZooKeeper, you should also pass the
> -z parameter."
> 
> -----------------
> 
> Thanks
> 
> Ravi Kiran Bhaskar

Re: SolrCloud Startup question

Posted by Ravi Solr <ra...@gmail.com>.
Thanks Anshum

On Mon, Sep 21, 2015 at 6:23 PM, Anshum Gupta <an...@anshumgupta.net>
wrote:

> CloudSolrClient is thread safe and it is highly recommended you reuse the
> client.
>
> If you are providing an HttpClient instance while constructing, make sure
> that the HttpClient uses a multi-threaded connection manager.
>
> On Mon, Sep 21, 2015 at 3:13 PM, Ravi Solr <ra...@gmail.com> wrote:
>
> > Thank you Anshum & Upayavira.
> >
> > BTW do any of you guys know if CloudSolrClient is ThreadSafe ??
> >
> > Thanks,
> >
> > Ravi Kiran Bhaskar
> >
> > On Monday, September 21, 2015, Anshum Gupta <an...@anshumgupta.net>
> > wrote:
> >
> > > Hi Ravi,
> > >
> > > I just tried it out and here's my understanding:
> > >
> > > 1. Starting Solr with -c starts Solr in cloud mode. This is used to
> start
> > > Solr with an embedded zookeeper.
> > > 2. Starting Solr with -z starts Solr in cloud mode, with the zk
> > connection
> > > string you specify. You don't need to explicitly specify -c in this
> case.
> > > The help text there needs a bit of fixing though
> > >
> > > *  -z <zkHost>   ZooKeeper connection string; only used when running in
> > > SolrCloud mode using -c*
> > > *                   To launch an embedded ZooKeeper instance, don't
> pass
> > > this parameter.*
> > >
> > > *"only used when running in SolrCloud mode using -c" *needs to be
> > rephrased
> > > or removed. Can you create a JIRA for the same?
> > >
> > >
> > > On Mon, Sep 21, 2015 at 1:35 PM, Ravi Solr <ravisolr@gmail.com
> > > <javascript:;>> wrote:
> > >
> > > > Can somebody kindly help me understand the difference between the
> > > following
> > > > startup calls ?
> > > >
> > > > ./solr start -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
> > > >
> > > > Vs
> > > >
> > > > ./solr start -c -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
> > > >
> > > > What happens if i don't pass the "-c" option ?? I read the
> > documentation
> > > > but got more confused, I do run a ZK ensemble of 3 instances.  FYI my
> > > cloud
> > > > seems to work fine and teh Admin UI shows Cloud graph just fine, but
> I
> > > want
> > > > to just make sure I am doing the right thing and not missing any
> > nuance.
> > > >
> > > > The following is form documention on cwiki.
> > > > ---------------
> > > >
> > > > "Start Solr in SolrCloud mode, which will also launch the embedded
> > > > ZooKeeper instance included with Solr.
> > > >
> > > > This option can be shortened to simply -c.
> > > >
> > > > If you are already running a ZooKeeper ensemble that you want to use
> > > > instead of the embedded (single-node) ZooKeeper, you should also pass
> > the
> > > > -z parameter."
> > > >
> > > > -----------------
> > > >
> > > > Thanks
> > > >
> > > > Ravi Kiran Bhaskar
> > > >
> > >
> > >
> > >
> > > --
> > > Anshum Gupta
> > >
> >
>
>
>
> --
> Anshum Gupta
>

Re: SolrCloud Startup question

Posted by Anshum Gupta <an...@anshumgupta.net>.
CloudSolrClient is thread safe and it is highly recommended you reuse the
client.

If you are providing an HttpClient instance while constructing, make sure
that the HttpClient uses a multi-threaded connection manager.

On Mon, Sep 21, 2015 at 3:13 PM, Ravi Solr <ra...@gmail.com> wrote:

> Thank you Anshum & Upayavira.
>
> BTW do any of you guys know if CloudSolrClient is ThreadSafe ??
>
> Thanks,
>
> Ravi Kiran Bhaskar
>
> On Monday, September 21, 2015, Anshum Gupta <an...@anshumgupta.net>
> wrote:
>
> > Hi Ravi,
> >
> > I just tried it out and here's my understanding:
> >
> > 1. Starting Solr with -c starts Solr in cloud mode. This is used to start
> > Solr with an embedded zookeeper.
> > 2. Starting Solr with -z starts Solr in cloud mode, with the zk
> connection
> > string you specify. You don't need to explicitly specify -c in this case.
> > The help text there needs a bit of fixing though
> >
> > *  -z <zkHost>   ZooKeeper connection string; only used when running in
> > SolrCloud mode using -c*
> > *                   To launch an embedded ZooKeeper instance, don't pass
> > this parameter.*
> >
> > *"only used when running in SolrCloud mode using -c" *needs to be
> rephrased
> > or removed. Can you create a JIRA for the same?
> >
> >
> > On Mon, Sep 21, 2015 at 1:35 PM, Ravi Solr <ravisolr@gmail.com
> > <javascript:;>> wrote:
> >
> > > Can somebody kindly help me understand the difference between the
> > following
> > > startup calls ?
> > >
> > > ./solr start -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
> > >
> > > Vs
> > >
> > > ./solr start -c -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
> > >
> > > What happens if i don't pass the "-c" option ?? I read the
> documentation
> > > but got more confused, I do run a ZK ensemble of 3 instances.  FYI my
> > cloud
> > > seems to work fine and teh Admin UI shows Cloud graph just fine, but I
> > want
> > > to just make sure I am doing the right thing and not missing any
> nuance.
> > >
> > > The following is form documention on cwiki.
> > > ---------------
> > >
> > > "Start Solr in SolrCloud mode, which will also launch the embedded
> > > ZooKeeper instance included with Solr.
> > >
> > > This option can be shortened to simply -c.
> > >
> > > If you are already running a ZooKeeper ensemble that you want to use
> > > instead of the embedded (single-node) ZooKeeper, you should also pass
> the
> > > -z parameter."
> > >
> > > -----------------
> > >
> > > Thanks
> > >
> > > Ravi Kiran Bhaskar
> > >
> >
> >
> >
> > --
> > Anshum Gupta
> >
>



-- 
Anshum Gupta

Re: SolrCloud Startup question

Posted by Ravi Solr <ra...@gmail.com>.
Thank you Anshum & Upayavira.

BTW do any of you guys know if CloudSolrClient is ThreadSafe ??

Thanks,

Ravi Kiran Bhaskar

On Monday, September 21, 2015, Anshum Gupta <an...@anshumgupta.net> wrote:

> Hi Ravi,
>
> I just tried it out and here's my understanding:
>
> 1. Starting Solr with -c starts Solr in cloud mode. This is used to start
> Solr with an embedded zookeeper.
> 2. Starting Solr with -z starts Solr in cloud mode, with the zk connection
> string you specify. You don't need to explicitly specify -c in this case.
> The help text there needs a bit of fixing though
>
> *  -z <zkHost>   ZooKeeper connection string; only used when running in
> SolrCloud mode using -c*
> *                   To launch an embedded ZooKeeper instance, don't pass
> this parameter.*
>
> *"only used when running in SolrCloud mode using -c" *needs to be rephrased
> or removed. Can you create a JIRA for the same?
>
>
> On Mon, Sep 21, 2015 at 1:35 PM, Ravi Solr <ravisolr@gmail.com
> <javascript:;>> wrote:
>
> > Can somebody kindly help me understand the difference between the
> following
> > startup calls ?
> >
> > ./solr start -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
> >
> > Vs
> >
> > ./solr start -c -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
> >
> > What happens if i don't pass the "-c" option ?? I read the documentation
> > but got more confused, I do run a ZK ensemble of 3 instances.  FYI my
> cloud
> > seems to work fine and teh Admin UI shows Cloud graph just fine, but I
> want
> > to just make sure I am doing the right thing and not missing any nuance.
> >
> > The following is form documention on cwiki.
> > ---------------
> >
> > "Start Solr in SolrCloud mode, which will also launch the embedded
> > ZooKeeper instance included with Solr.
> >
> > This option can be shortened to simply -c.
> >
> > If you are already running a ZooKeeper ensemble that you want to use
> > instead of the embedded (single-node) ZooKeeper, you should also pass the
> > -z parameter."
> >
> > -----------------
> >
> > Thanks
> >
> > Ravi Kiran Bhaskar
> >
>
>
>
> --
> Anshum Gupta
>

Re: SolrCloud Startup question

Posted by Anshum Gupta <an...@anshumgupta.net>.
Hi Ravi,

I just tried it out and here's my understanding:

1. Starting Solr with -c starts Solr in cloud mode. This is used to start
Solr with an embedded zookeeper.
2. Starting Solr with -z starts Solr in cloud mode, with the zk connection
string you specify. You don't need to explicitly specify -c in this case.
The help text there needs a bit of fixing though

*  -z <zkHost>   ZooKeeper connection string; only used when running in
SolrCloud mode using -c*
*                   To launch an embedded ZooKeeper instance, don't pass
this parameter.*

*"only used when running in SolrCloud mode using -c" *needs to be rephrased
or removed. Can you create a JIRA for the same?


On Mon, Sep 21, 2015 at 1:35 PM, Ravi Solr <ra...@gmail.com> wrote:

> Can somebody kindly help me understand the difference between the following
> startup calls ?
>
> ./solr start -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
>
> Vs
>
> ./solr start -c -p 1111 -s /solr/home -z zk1:2181,zk2:2181,zk3:2181
>
> What happens if i don't pass the "-c" option ?? I read the documentation
> but got more confused, I do run a ZK ensemble of 3 instances.  FYI my cloud
> seems to work fine and teh Admin UI shows Cloud graph just fine, but I want
> to just make sure I am doing the right thing and not missing any nuance.
>
> The following is form documention on cwiki.
> ---------------
>
> "Start Solr in SolrCloud mode, which will also launch the embedded
> ZooKeeper instance included with Solr.
>
> This option can be shortened to simply -c.
>
> If you are already running a ZooKeeper ensemble that you want to use
> instead of the embedded (single-node) ZooKeeper, you should also pass the
> -z parameter."
>
> -----------------
>
> Thanks
>
> Ravi Kiran Bhaskar
>



-- 
Anshum Gupta