Examples of recursiveDelete()


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

  }
 
  public void delete(String server) {
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
    try {
      zoo.recursiveDelete(path + "/" + server, NodeMissingPolicy.SKIP);
    } catch (Exception ex) {
      log.error(ex, ex);
    }
  }
 
View Full Code Here

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

      // remove old settings from zookeeper first, if any
      IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
      synchronized (zooCache) {
        zooCache.clear();
        if (zoo.exists(ZKUserPath)) {
          zoo.recursiveDelete(ZKUserPath, NodeMissingPolicy.SKIP);
          log.info("Removed " + ZKUserPath + "/" + " from zookeeper");
        }
       
        // prep parent node of users with root username
        zoo.putPersistentData(ZKUserPath, principal.getBytes(Constants.UTF8), NodeExistsPolicy.FAIL);
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.IZooReaderWriter.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

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

    File reportDir = new File(args[1]);
   
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
   
    if (zoo.exists(rootDir)) {
      zoo.recursiveDelete(rootDir, NodeMissingPolicy.FAIL);
    }
   
    if (!reportDir.exists()) {
      reportDir.mkdir();
    } else {
View Full Code Here

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

  @Override
  public void dropUser(String user) throws AccumuloSecurityException {
    try {
      synchronized (zooCache) {
        IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
        zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserAuths, NodeMissingPolicy.SKIP);
        zooCache.clear(ZKUserPath + "/" + user);
      }
    } catch (InterruptedException e) {
      log.error(e, e);
      throw new RuntimeException(e);
View Full Code Here

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

    File reportDir = new File(args[1]);
   
    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
   
    if (zoo.exists(rootDir)) {
      zoo.recursiveDelete(rootDir, NodeMissingPolicy.FAIL);
    }
   
    if (!reportDir.exists()) {
      reportDir.mkdir();
    } else {
View Full Code Here

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

          zk.putPersistentData(rootDir + "/dir/" + child, new byte[0], NodeExistsPolicy.SKIP);
          children.add(child);
        } else if (children.size() > 0) {
          int index = r.nextInt(children.size());
          String child = children.remove(index);
          zk.recursiveDelete(rootDir + "/dir/" + child, NodeMissingPolicy.FAIL);
        }
       
        for (String child : children) {
          expectedData.put(rootDir + "/dir/" + child, "");
        }
View Full Code Here

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

         
          expectedData.put(rootDir + "/dataS", new String(data));
         
        } else {
          if (dataSExists) {
            zk.recursiveDelete(rootDir + "/dataS", NodeMissingPolicy.FAIL);
            dataSExists = false;
          }
        }
      }
     
View Full Code Here

Examples of org.apache.accumulo.fate.zookeeper.IZooReaderWriter.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

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

      try {
        log.info("Upgrading zookeeper");
       
        IZooReaderWriter zoo = ZooReaderWriter.getInstance();
       
        zoo.recursiveDelete(ZooUtil.getRoot(instance) + "/loggers", NodeMissingPolicy.SKIP);
        zoo.recursiveDelete(ZooUtil.getRoot(instance) + "/dead/loggers", NodeMissingPolicy.SKIP);

        zoo.putPersistentData(ZooUtil.getRoot(instance) + Constants.ZRECOVERY, new byte[] {'0'}, NodeExistsPolicy.SKIP);
       
        for (String id : Tables.getIdToNameMap(instance).keySet()) {
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.