Examples of KeeperState


Examples of org.apache.zookeeper.Watcher.Event.KeeperState

     * for more information.
     *
     * @param event WatchedEvent witnessed by ZooKeeper.
     */
    public void process(WatchedEvent event) {
      KeeperState state = event.getState();
      LOG.debug("Got ZooKeeper event, state: " + state + ", type: "
          + event.getType() + ", path: " + event.getPath());
      if (state == KeeperState.Expired) {
        resetZooKeeper();
      }
View Full Code Here

Examples of org.apache.zookeeper.Watcher.Event.KeeperState

   * Either way we need to update our knowledge of the master.
   * @param event WatchedEvent from ZooKeeper.
   */
  public void process(WatchedEvent event) {
    EventType type = event.getType();
    KeeperState state = event.getState();
    LOG.info("Got ZooKeeper event, state: " + state + ", type: " +
      type + ", path: " + event.getPath());

    // Ignore events if we're shutting down.
    if (stopRequested.get()) {
View Full Code Here

Examples of org.apache.zookeeper.Watcher.Event.KeeperState

     * for more information.
     *
     * @param event WatchedEvent witnessed by ZooKeeper.
     */
    public void process(WatchedEvent event) {
      KeeperState state = event.getState();
      LOG.debug("Got ZooKeeper event, state: " + state + ", type: "
          + event.getType() + ", path: " + event.getPath());
      if (state == KeeperState.Expired) {
        resetZooKeeper();
      }
View Full Code Here

Examples of org.apache.zookeeper.Watcher.Event.KeeperState

      this.sessionTimeout = sessionTimeout;
    }

    @Override
    public void process(WatchedEvent event) {
      KeeperState state = event.getState();
      LOG.info("ZooKeeper [{0}] timeout [{1}] changed to [{2}] state", zkConnectionString, sessionTimeout, state);
    }
View Full Code Here

Examples of org.apache.zookeeper.Watcher.Event.KeeperState

     * for more information.
     *
     * @param event WatchedEvent witnessed by ZooKeeper.
     */
    public void process(final WatchedEvent event) {
      final KeeperState state = event.getState();
      if (!state.equals(KeeperState.SyncConnected)) {
        LOG.warn("No longer connected to ZooKeeper, current state: " + state);
        resetZooKeeper();
      }
    }
View Full Code Here

Examples of org.apache.zookeeper.Watcher.Event.KeeperState

   * Either way we need to update our knowledge of the master.
   * @param event WatchedEvent from ZooKeeper.
   */
  public void process(WatchedEvent event) {
    EventType type = event.getType();
    KeeperState state = event.getState();
    LOG.info("Got ZooKeeper event, state: " + state + ", type: " +
      type + ", path: " + event.getPath());

    // Ignore events if we're shutting down.
    if (this.stopRequested.get()) {
View Full Code Here

Examples of org.apache.zookeeper.Watcher.Event.KeeperState

    }

    @Test
    public void testInvalidIntConversion() {
        try {
            KeeperState ks = KeeperState.fromInt(324142);
            fail("Was able to create an invalid KeeperState via an integer");
        } catch(RuntimeException re) {
            // we're good.
        }
View Full Code Here

Examples of org.apache.zookeeper.Watcher.Event.KeeperState

            LOG.info("Session establishment complete on server "
                    + clientCnxnSocket.getRemoteSocketAddress()
                    + ", sessionid = 0x" + Long.toHexString(sessionId)
                    + ", negotiated timeout = " + negotiatedSessionTimeout
                    + (isRO ? " (READ-ONLY mode)" : ""));
            KeeperState eventState = (isRO) ?
                    KeeperState.ConnectedReadOnly : KeeperState.SyncConnected;
            eventThread.queueEvent(new WatchedEvent(
                    Watcher.Event.EventType.None,
                    eventState, null));
        }
View Full Code Here

Examples of org.apache.zookeeper.Watcher.Event.KeeperState

                                   LOG.error("SASL authentication with Zookeeper Quorum member failed: " + e);
                                    state = States.AUTH_FAILED;
                                    sendAuthEvent = true;
                                }
                            }
                            KeeperState authState = zooKeeperSaslClient.getKeeperState();
                            if (authState != null) {
                                if (authState == KeeperState.AuthFailed) {
                                    // An authentication error occurred during authentication with the Zookeeper Server.
                                    state = States.AUTH_FAILED;
                                    sendAuthEvent = true;
View Full Code Here

Examples of org.apache.zookeeper.Watcher.Event.KeeperState

            LOG.info("Session establishment complete on server "
                    + clientCnxnSocket.getRemoteSocketAddress()
                    + ", sessionid = 0x" + Long.toHexString(sessionId)
                    + ", negotiated timeout = " + negotiatedSessionTimeout
                    + (isRO ? " (READ-ONLY mode)" : ""));
            KeeperState eventState = (isRO) ?
                    KeeperState.ConnectedReadOnly : KeeperState.SyncConnected;
            eventThread.queueEvent(new WatchedEvent(
                    Watcher.Event.EventType.None,
                    eventState, null));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.