Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper, mail # user - Determine if the distributed mode of ZK functions correctly


Copy link to this message
-
Re: Determine if the distributed mode of ZK functions correctly
Neha Narkhede 2011-12-06, 21:30
>> Where can I find this "srsr" command?

It is actually the 4 letter command - "srvr". You can run it like any other
4 letter zk command -

echo srvr | nc zk-server zk-port

Thanks,
Neha

On Tue, Dec 6, 2011 at 1:26 PM, Florian Leibert <[EMAIL PROTECTED]> wrote:

> Where can I find this "srsr" command? It's not part of the zkCli syntax nor
> can I find a reference to it...
>
> Thanks,
> Florian
>
> On Tue, Dec 6, 2011 at 11:51 AM, Neha Narkhede <[EMAIL PROTECTED]
> >wrote:
>
> > >> I was wondering if there was an easy way to check if a given zookeeper
> > server has joined an ensemble successfully and how many nodes of the
> > ensemble are alive.
> >
> > Today, we do this by relying on the Mode reported by the srvr command. If
> > the value is anything other than leader/follower, it is not participating
> > in the quorum.
> > We simply count the total of leader/follower nodes and ensure that they
> are
> > higher than a threshold.
> >
> > The downside of this approach is having to run srvr periodically.
> >
> > Thanks,
> > Neha
> >
> > On Tue, Dec 6, 2011 at 11:44 AM, Florian Leibert <[EMAIL PROTECTED]> wrote:
> >
> > > Thanks - though I'll have to have knowledge of the other servers and
> have
> > > to maintain yet another copy of the server-addresses - I wanted to use
> it
> > > within monit to determine if the server is functioning correctly -
> while
> > I
> > > of course have to always change the zoo.cnf in case of topology
> changes,
> > I
> > > now also have to update my monit scripts to add/remove any servers to
> use
> > > with the smoketest.
> > >
> > > Too bad ZK doesn't expose via the API a get_ensemble_size ~ that would
> > > allow me to alert in case the ensemble is less than X...
> > >
> > > But this helps!
> > >
> > > Thanks!
> > >
> > > On Tue, Dec 6, 2011 at 11:39 AM, Patrick Hunt <[EMAIL PROTECTED]>
> wrote:
> > >
> > > > I created the zk-smoketest project explicitly to help ops with this
> > > > problem:
> > > > https://github.com/phunt/zk-smoketest
> > > >
> > > > Patrick
> > > >
> > > > On Tue, Dec 6, 2011 at 9:39 AM, Florian Leibert <[EMAIL PROTECTED]>
> > wrote:
> > > > > Hi -
> > > > > I was wondering if there was an easy way to check if a given
> > zookeeper
> > > > > server has joined an ensemble successfully and how many nodes of
> the
> > > > > ensemble are alive. Of course I could create a test-node on one of
> > the
> > > > > servers and check the existence on the other ones but wanted to
> check
> > > > first
> > > > > if there was another way.
> > > > >
> > > > > I looked at the client bindings in the python project as well as
> the
> > > ones
> > > > > in the ruby project but didn't see that there really was one. I
> > > > > specifically want to ensure that the servers are communicating with
> > > each
> > > > > other and not form "separate" ensembles.
> > > > >
> > > > > Thanks,
> > > > > Florian
> > > >
> > >
> > >
> > >
> > > --
> > > Best regards,
> > >
> > > Florian
> > > http://twitter.com/flo <http://twitter.com/floleibert>
> > > http://flori.posterous.com/
> > >
> >
>
>
>
> --
> Best regards,
>
> Florian
> http://twitter.com/flo <http://twitter.com/floleibert>
> http://flori.posterous.com/
>