Examples of ZKIntegration


Examples of org.apache.slider.core.zk.ZKIntegration

    String zkPath = ZKIntegration.mkClusterPath(user, clusterName);
    Exception e = null;
    try {
      Configuration config = getConfig();
      if (!SliderUtils.isHadoopClusterSecure(config)) {
        ZKIntegration client = getZkClient(clusterName, user);
        if (client != null) {
          if (client.exists(zkPath)) {
            log.info("Deleting zookeeper path {}", zkPath);
          }
          client.deleteRecursive(zkPath);
          return true;
        }
      } else {
        log.warn("Default zookeeper node is not available for secure cluster");
      }
View Full Code Here

Examples of org.apache.slider.core.zk.ZKIntegration

    if(nameOnly) {
      return zkPath;
    }
    Configuration config = getConfig();
    if (!SliderUtils.isHadoopClusterSecure(config)) {
      ZKIntegration client = getZkClient(clusterName, user);
      if (client != null) {
        try {
          client.createPath(zkPath, "", ZooDefs.Ids.OPEN_ACL_UNSAFE,
                            CreateMode.PERSISTENT);
          return zkPath;
        } catch (InterruptedException e) {
          log.warn("Unable to create zk node {}", zkPath, e);
        } catch (KeeperException e) {
View Full Code Here

Examples of org.apache.slider.core.zk.ZKIntegration

  /**
   * Gets a zookeeper client, returns null if it cannot connect to zookeeper
   **/
  protected ZKIntegration getZkClient(String clusterName, String user) throws YarnException {
    String registryQuorum = lookupZKQuorum();
    ZKIntegration client = null;
    try {
      BlockingZKWatcher watcher = new BlockingZKWatcher();
      client = ZKIntegration.newInstance(registryQuorum, user, clusterName, true, false, watcher);
      client.init();
      watcher.waitForZKConnection(2 * 1000);
    } catch (InterruptedException e) {
      client = null;
      log.warn("Unable to connect to zookeeper quorum {}", registryQuorum, e);
    } catch (IOException e) {
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.