Package org.apache.helix.model

Examples of org.apache.helix.model.PauseSignal


        logger.warn("leader name does NOT match, my name: " + instanceName + ", leader: " + leader);
        return;
      }
    }

    PauseSignal pauseSignal = accessor.getProperty(keyBuilder.pause());
    if (pauseSignal != null) {
      _paused = true;
      logger.info("controller is now paused");
    } else {
      if (_paused) {
View Full Code Here


        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor<ZNRecord>(zkClient));

    String cmd = "-zkSvr " + _zkaddr + " -enableCluster " + clusterName + " false";
    ClusterSetup.processCommandLineArgs(cmd.split(" "));

    tmpAccessor.setProperty(tmpAccessor.keyBuilder().pause(), new PauseSignal("pause"));
    zkClient.close();

    // wait for controller to be signaled by pause
    Thread.sleep(1000);
View Full Code Here

      accessor.updateProperty(accessor.keyBuilder().clusterConfig(), config);

      // Update paused status
      if (_paused != null) {
        if (_paused) {
          accessor.createProperty(accessor.keyBuilder().pause(), new PauseSignal("pause"));
        } else {
          accessor.removeProperty(accessor.keyBuilder().pause());
        }
      }
View Full Code Here

        logger.warn("leader name does NOT match, my name: " + instanceName + ", leader: " + leader);
        return;
      }
    }

    PauseSignal pauseSignal = accessor.getProperty(keyBuilder.pause());
    if (pauseSignal != null) {
      _paused = true;
      logger.info("controller is now paused");
    } else {
      if (_paused) {
View Full Code Here

    Builder keyBuilder = accessor.keyBuilder();

    if (enabled) {
      accessor.removeProperty(keyBuilder.pause());
    } else {
      accessor.createProperty(keyBuilder.pause(), new PauseSignal("pause"));
    }
  }
View Full Code Here

      clusterConstraintMap.put(ConstraintType.valueOf(constraintType),
          constraintMap.get(constraintType));
    }

    // read the pause status
    PauseSignal pauseSignal = _accessor.getProperty(_keyBuilder.pause());
    boolean isPaused = pauseSignal != null;

    ClusterConfiguration clusterConfig = _accessor.getProperty(_keyBuilder.clusterConfig());
    boolean autoJoinAllowed = false;
    UserConfig userConfig;
View Full Code Here

  /**
   * pause controller of cluster
   * @return true if cluster was paused, false if pause failed or already paused
   */
  public boolean pauseCluster() {
    return _accessor.createProperty(_keyBuilder.pause(), new PauseSignal("pause"));
  }
View Full Code Here

    Builder keyBuilder = accessor.keyBuilder();

    if (enabled) {
      accessor.removeProperty(keyBuilder.pause());
    } else {
      accessor.createProperty(keyBuilder.pause(), new PauseSignal("pause"));
    }
  }
View Full Code Here

        logger.warn("leader name does NOT match, my name: " + instanceName + ", leader: " + leader);
        return;
      }
    }

    PauseSignal pauseSignal = accessor.getProperty(keyBuilder.pause());
    if (pauseSignal != null) {
      _paused = true;
      logger.info("controller is now paused");
    } else {
      if (_paused) {
View Full Code Here

    {
      accessor.removeProperty(keyBuilder.pause());
    }
    else
    {
      accessor.createProperty(keyBuilder.pause(), new PauseSignal("pause"));
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.helix.model.PauseSignal

Copyright © 2018 www.massapicom. 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.