Examples of recursiveDelete()


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

        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

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

    }
   
    public static void stop(String type, long tid) throws KeeperException, InterruptedException {
      Instance instance = HdfsZooInstance.getInstance();
      IZooReaderWriter writer = ZooReaderWriter.getInstance();
      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid, NodeMissingPolicy.SKIP);
    }
   
    public static void cleanup(String type, long tid) throws KeeperException, InterruptedException {
      Instance instance = HdfsZooInstance.getInstance();
      IZooReaderWriter writer = ZooReaderWriter.getInstance();
View Full Code Here

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

    }
   
    public static void cleanup(String type, long tid) throws KeeperException, InterruptedException {
      Instance instance = HdfsZooInstance.getInstance();
      IZooReaderWriter writer = ZooReaderWriter.getInstance();
      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid, NodeMissingPolicy.SKIP);
      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid + "-running", NodeMissingPolicy.SKIP);
    }

    @Override
    public boolean transactionComplete(String type, long tid) throws Exception {
View Full Code Here

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

   
    public static void cleanup(String type, long tid) throws KeeperException, InterruptedException {
      Instance instance = HdfsZooInstance.getInstance();
      IZooReaderWriter writer = ZooReaderWriter.getInstance();
      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid, NodeMissingPolicy.SKIP);
      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid + "-running", NodeMissingPolicy.SKIP);
    }

    @Override
    public boolean transactionComplete(String type, long tid) throws Exception {
      String path = ZooUtil.getRoot(instance) + "/" + type + "/" + tid + "-running";
View Full Code Here

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

    ZooUtil.putPersistentData(zoo.getZooKeeper(), Constants.ZROOT, new byte[0], -1, NodeExistsPolicy.SKIP, Ids.OPEN_ACL_UNSAFE);
    ZooUtil.putPersistentData(zoo.getZooKeeper(), Constants.ZROOT + Constants.ZINSTANCES, new byte[0], -1, NodeExistsPolicy.SKIP, Ids.OPEN_ACL_UNSAFE);
   
    // setup instance name
    if (opts.clearInstanceName)
      zoo.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
    zoo.putPersistentData(instanceNamePath, uuid.getBytes(), NodeExistsPolicy.FAIL);
   
    // setup the instance
    String zkInstanceRoot = Constants.ZROOT + "/" + uuid;
    zoo.putPersistentData(zkInstanceRoot, new byte[0], NodeExistsPolicy.FAIL);
View Full Code Here

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

          for (String instanceName : zk.getChildren(root + Constants.ZINSTANCES)) {
            String instanceNamePath = root + Constants.ZINSTANCES + "/" + instanceName;
            byte[] id = zk.getData(instanceNamePath, null);
            if (id != null && !new String(id).equals(HdfsZooInstance.getInstance().getInstanceID())) {
              try {
                zk.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
              } catch (KeeperException.NoAuthException ex) {
                log.warn("Unable to delete " + instanceNamePath);
              }
            }
          }
View Full Code Here

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

            }
          }
        } else if (!child.equals(HdfsZooInstance.getInstance().getInstanceID())) {
          String path = root + "/" + child;
          try {
            zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
          } catch (KeeperException.NoAuthException ex) {
            log.warn("Unable to delete " + path);
          }
        }
      }
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()

    try {
      if (tablePerms.remove(permission)) {
        zooCache.clear();
        IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
        if (tablePerms.size() == 0)
          zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table, NodeMissingPolicy.SKIP);
        else
          zoo.putPersistentData(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table, ZKSecurityTool.convertTablePermissions(tablePerms),
              NodeExistsPolicy.OVERWRITE);
      }
    } catch (KeeperException 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.