Class QuorumZooKeeperServer

    • Method Detail

      • setState

        protected void setState​(ZooKeeperServer.State state)
        Description copied from class: ZooKeeperServer
        Sets the state of ZooKeeper server. After changing the state, it notifies the server state change to a registered shutdown handler, if any.

        The following are the server state transitions:

      • During startup the server will be in the INITIAL state.
      • After successfully starting, the server sets the state to RUNNING.
      • The server transitions to the ERROR state if it hits an internal error. ZooKeeperServerListenerImpl notifies any critical resource error events, e.g., SyncRequestProcessor not being able to write a txn to disk.
      • During shutdown the server sets the state to SHUTDOWN, which corresponds to the server not running.
Overrides:
setState in class ZooKeeperServer
Parameters:
state - new server state.