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

      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

   * 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();
      if(!state.equals(KeeperState.SyncConnected)) {
        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.shutdown = shutdown;
    this.zooKeeper = zooKeeper;
    zooKeeper.register(new Watcher() {
      @Override
      public void process(WatchedEvent event) {
        KeeperState state = event.getState();
        if (state == KeeperState.Expired) {
          LOG.fatal("Zookeeper session has [" + state + "] server process shutting down.");
          shutdown.shutdown();
        }
      }
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

     * for more information.
     *
     * @param event WatchedEvent witnessed by ZooKeeper.
     */
    public void process(WatchedEvent event) {
      KeeperState state = event.getState();
      if(!state.equals(KeeperState.SyncConnected)) {
        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

    }

    @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

   * 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
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.