zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camille Fournier <cami...@apache.org>
Subject Re: LocalPeerBean getState() Possibly Incorrect
Date Tue, 04 Aug 2015 15:44:29 GMT
Yup that's a bug alright. Please feel free to file a ticket and even better
file a ticket and submit a patch.

Thanks,
C

On Tue, Aug 4, 2015 at 11:37 AM, Kevin Lee <kglee79@yahoo.com.invalid>
wrote:

> Hi,
>
> When performing some JMX investigation and looking at the “State” within
> the LocalPeerBean, I noticed the state was “Runnable”.  So I downloaded the
> Zookeeper source code and took a look at LocalPeerBean.java in
> org/apache/zookeeper/server/quorum.  It appears that it is returning
> “peer.getState().toString()” which I do not believe was the intent here
> because peer.getState() is returning the “Thread” state, not the server
> state as the comment says it should be in “LocalPeerMXBean.java”.  To get
> the server state it should be doing a “peer.getServerState()” which will
> use the getServerState() method on the QuorumPeer class from which it is
> retrieving the state.  So the states would be “following”, “leading”, etc
> instead of the Java thread states.
>
> Does anyone know if this a bug that needs to be addressed or if it is
> working as intended?
>
> Thanks,
> Kevin

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