Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B5FA18BD3 for ; Tue, 4 Aug 2015 15:44:32 +0000 (UTC) Received: (qmail 24016 invoked by uid 500); 4 Aug 2015 15:44:31 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 23964 invoked by uid 500); 4 Aug 2015 15:44:31 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 23953 invoked by uid 99); 4 Aug 2015 15:44:31 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2015 15:44:31 +0000 Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id DD0791A0503 for ; Tue, 4 Aug 2015 15:44:30 +0000 (UTC) Received: by labgo9 with SMTP id go9so10176134lab.3 for ; Tue, 04 Aug 2015 08:44:29 -0700 (PDT) X-Gm-Message-State: ALoCoQlejAaTQyMiNAj2Z9AJhkrafWEq3hdiYRvOWfMBbcDXgI1Nq/lnJY0sirBalNWsdzHvJGnB MIME-Version: 1.0 X-Received: by 10.112.148.130 with SMTP id ts2mr4237211lbb.17.1438703069356; Tue, 04 Aug 2015 08:44:29 -0700 (PDT) Received: by 10.112.134.231 with HTTP; Tue, 4 Aug 2015 08:44:29 -0700 (PDT) In-Reply-To: <8E75D5F2-C4A5-49A1-87BE-35EBCF5B590C@yahoo.com> References: <8E75D5F2-C4A5-49A1-87BE-35EBCF5B590C@yahoo.com> Date: Tue, 4 Aug 2015 11:44:29 -0400 Message-ID: Subject: Re: LocalPeerBean getState() Possibly Incorrect From: Camille Fournier To: "bookkeeper-user@zookeeper.apache.org" Content-Type: multipart/alternative; boundary=047d7b3a81ea6300e4051c7e295a --047d7b3a81ea6300e4051c7e295a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 wrote: > Hi, > > When performing some JMX investigation and looking at the =E2=80=9CState= =E2=80=9D within > the LocalPeerBean, I noticed the state was =E2=80=9CRunnable=E2=80=9D. S= o 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 > =E2=80=9Cpeer.getState().toString()=E2=80=9D which I do not believe was t= he intent here > because peer.getState() is returning the =E2=80=9CThread=E2=80=9D state, = not the server > state as the comment says it should be in =E2=80=9CLocalPeerMXBean.java= =E2=80=9D. To get > the server state it should be doing a =E2=80=9Cpeer.getServerState()=E2= =80=9D which will > use the getServerState() method on the QuorumPeer class from which it is > retrieving the state. So the states would be =E2=80=9Cfollowing=E2=80=9D= , =E2=80=9Cleading=E2=80=9D, 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 --047d7b3a81ea6300e4051c7e295a--