Il giorno mar 8 mag 2018 alle ore 09:55 Flavio Junqueira <f...@apache.org>
ha scritto:

> Hi Enrico,
>
> You can determine the state of a server it via 4-letter commands. Would
> that work for you?
>

Hi Flavio,
In my case I would like to have that info directly via JMX, in order to use
4-letter words I would need an additional communication channel and it can
be quite expensive (open/close connection) as I need automatic monitoring
of the status of the cluster.
>From JMX I can know if the local peer is the leader, but if the local peer
is a follower I can't ask him which is the leader from its point of view.

>From your answer I guess that the final answer is no.
I did not check the code, if the change is minimal (I guess the follower
knows which is the current leadger) I can work on a patch

Thank you
Enrico





>
> -Flavio
>
> > On 8 May 2018, at 09:09, Enrico Olivelli <eolive...@gmail.com> wrote:
> >
> > Hi,
> > is there any way to see in JMX which is the leader of a ZooKeeper
> cluster?
> >
> > My problem is: given access to any of the nodes of the cluster I want to
> > know from JMX which is the current leader.
> > It seems to me that this information is not available, you can know only
> if
> > the local node is Leader or Follower.
> >
> > Cheers
> > Enrico
>
>

Reply via email to