Package org.I0Itec.zkclient

Examples of org.I0Itec.zkclient.ZkClient.deleteRecursive()


      ExampleUtils.getRequiredIntProperty("sessionTimeoutMillis", LOG),
      ExampleUtils.getRequiredIntProperty("connectTimeoutMillis", LOG));

    for (String pathToDelete : pathsToDelete)
    {
      zkClient.deleteRecursive(pathToDelete);
    }

    zkClient.close();
  }
View Full Code Here


  @Override
  public void nodeOperationsComplete(MasterContext context, List<OperationResult> results) throws Exception {
    ZkClient zkClient = context.getProtocol().getZkClient();
    ZkConfiguration zkConf = context.getProtocol().getZkConfiguration();
    for (Shard shard : _indexMD.getShards()) {
      zkClient.deleteRecursive(zkConf.getZkPath(PathDef.SHARD_TO_NODES, shard.getName()));
    }
  }

  @Override
  public ExecutionInstruction getExecutionInstruction(List<MasterOperation> runningOperations) throws Exception {
View Full Code Here

        void tryCleanupZookeeper() {
            try {
                ZkClient zk = new ZkClient(m_zkhost);
                String dir = "/consumers/" + m_groupId;
                zk.deleteRecursive(dir);
                dir = "/consumers/" + m_groupId + "-done";
                zk.deleteRecursive(dir);
                zk.close();
            } catch (Exception ex) {
                ex.printStackTrace();
View Full Code Here

            try {
                ZkClient zk = new ZkClient(m_zkhost);
                String dir = "/consumers/" + m_groupId;
                zk.deleteRecursive(dir);
                dir = "/consumers/" + m_groupId + "-done";
                zk.deleteRecursive(dir);
                zk.close();
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
View Full Code Here

    public static CountDownLatch getReadySignal(String zkString, final String parentPath, final int counts) {
        ZkClient zkClient = new ZkClient(zkString);
        if (zkClient.exists(parentPath)) {
            System.out.println(parentPath + " path exists and will be deleted");
            zkClient.deleteRecursive(parentPath);
        }
        zkClient.createPersistent(parentPath);
        final CountDownLatch signalReady = new CountDownLatch(1);
        zkClient.subscribeChildChanges(parentPath, new IZkChildListener() {
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.