Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2239

JMX State from LocalPeerBean incorrect

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.6, 3.5.0, 3.5.1
    • Fix Version/s: 3.4.7, 3.5.2, 3.6.0
    • Component/s: jmx
    • Labels:
      None
    • Environment:

      All

      Description

      The "State" property of LocalPeerBean in package org.apache.zookeeper.server.quorum is returning the incorrect value. It is performing peer.getState() which is calling the getState() method on java.lang.Thread instead of getting the server state from org.apache.zookeeper.server.quorum.QuorumPeer. The Javadoc within LocalPeerMXBean.java states that it should be returning the server state as well. The fix is to call peer.getServerState() in the getState() method of LocalPeerBean instead of peer.getState().toString(). This will return the states defined in QuorumStats.Provider (unknown, leaderelection, leading, following, and observing). This issue prevents JMX monitoring of the Zookeeper server state.

        Attachments

        1. ZOOKEEPER-2239.patch
          0.5 kB
          Kevin Lee

          Activity

            People

            • Assignee:
              kglee79 Kevin Lee
              Reporter:
              kglee79 Kevin Lee

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment