Examples of recursiveDelete()


Examples of org.apache.accumulo.fate.zookeeper.ZooReaderWriter.recursiveDelete()

      byte data[] = writer.getData(lockPath, null);
      writer.getZooKeeper().setData(lockPath, data, -1);
      // let it propagate
      UtilWaitThread.sleep(500);
      // kill the master by removing its lock
      writer.recursiveDelete(lockPath, NodeMissingPolicy.FAIL);
      // ensure the backup becomes the master
      getConnector().tableOperations().create(getUniqueNames(1)[0]);
    } finally {
      backup.destroy();
    }
View Full Code Here

Examples of org.apache.accumulo.server.zookeeper.IZooReaderWriter.recursiveDelete()

          String[] parts = entry.split("/");
          String zpath = root + "/" + parts[1];
          while (true) {
            try {
              if (zk.exists(zpath)) {
                zk.recursiveDelete(zpath, NodeMissingPolicy.SKIP);
                foundEntry = true;
              }
              break;
            } catch (KeeperException e) {
              log.error(e, e);
View Full Code Here

Examples of org.apache.accumulo.server.zookeeper.IZooReaderWriter.recursiveDelete()

        String root = getZookeeperLogLocation();
        while (true) {
          try {
            IZooReaderWriter zoo = ZooReaderWriter.getInstance();
            if (zoo.isLockHeld(zooLock.getLockID()))
              zoo.recursiveDelete(root + "/" + entry.filename, NodeMissingPolicy.SKIP);
            break;
          } catch (Exception e) {
            log.error(e, e);
          }
          UtilWaitThread.sleep(1000);
View Full Code Here

Examples of org.apache.accumulo.server.zookeeper.IZooReaderWriter.recursiveDelete()

    uuids.remove("instances");
    for (String name : args) {
      if (instances.contains(args[0])) {
        String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
        byte[] data = zk.getData(path, null);
        zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
        zk.recursiveDelete(Constants.ZROOT + "/" + new String(data), NodeMissingPolicy.SKIP);
      } else if (uuids.contains(name)) {
        // look for the real instance name
        for (String instance : instances) {
          String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
View Full Code Here

Examples of org.apache.accumulo.server.zookeeper.IZooReaderWriter.recursiveDelete()

    for (String name : args) {
      if (instances.contains(args[0])) {
        String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + name;
        byte[] data = zk.getData(path, null);
        zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
        zk.recursiveDelete(Constants.ZROOT + "/" + new String(data), NodeMissingPolicy.SKIP);
      } else if (uuids.contains(name)) {
        // look for the real instance name
        for (String instance : instances) {
          String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
          byte[] data = zk.getData(path, null);
View Full Code Here

Examples of org.apache.accumulo.server.zookeeper.IZooReaderWriter.recursiveDelete()

        // look for the real instance name
        for (String instance : instances) {
          String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
          byte[] data = zk.getData(path, null);
          if (name.equals(new String(data)))
            zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
        }
        zk.recursiveDelete(Constants.ZROOT + "/" + name, NodeMissingPolicy.SKIP);
      }
    }
  }
View Full Code Here

Examples of org.apache.accumulo.server.zookeeper.IZooReaderWriter.recursiveDelete()

          String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
          byte[] data = zk.getData(path, null);
          if (name.equals(new String(data)))
            zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
        }
        zk.recursiveDelete(Constants.ZROOT + "/" + name, NodeMissingPolicy.SKIP);
      }
    }
  }
 
}
View Full Code Here

Examples of org.apache.accumulo.server.zookeeper.IZooReaderWriter.recursiveDelete()

    try {
      log.debug("Removing " + path);
      path = relative(path);
      IZooReaderWriter zoo = ZooReaderWriter.getInstance();
      if (zoo.exists(path))
        zoo.recursiveDelete(path, NodeMissingPolicy.SKIP);
      cache.clear();
    } catch (Exception ex) {
      throw new DistributedStoreException(ex);
    }
  }
View Full Code Here

Examples of org.apache.accumulo.server.zookeeper.ZooReaderWriter.recursiveDelete()

    if (zoo.exists(monitorPath)) {
      byte[] data = zoo.getData(monitorPath, null);
      // If the node isn't empty, it's from a previous install (has hostname:port for HTTP server)
      if (0 != data.length) {
        // Recursively delete from that parent node
        zoo.recursiveDelete(monitorPath, NodeMissingPolicy.SKIP);

        // And then make the nodes that we expect for the incoming ephemeral nodes
        zoo.putPersistentData(monitorPath, new byte[0], NodeExistsPolicy.FAIL);
        zoo.putPersistentData(monitorLockPath, new byte[0], NodeExistsPolicy.FAIL);
      } else if (!zoo.exists(monitorLockPath)) {
View Full Code Here

Examples of org.apache.accumulo.server.zookeeper.ZooReaderWriter.recursiveDelete()

    fs.create(new Path(ServerConstants.getInstanceIdLocation(), newInstanceId)).close();
  }
 
  private static void deleteInstance(Instance origInstance, String oldPass) throws Exception {
    IZooReaderWriter orig = new ZooReaderWriter(origInstance.getZooKeepers(), origInstance.getZooKeepersSessionTimeOut(), oldPass);
    orig.recursiveDelete("/accumulo/" + origInstance.getInstanceID(), NodeMissingPolicy.SKIP);
  }
}
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.