Examples of recursiveDelete()


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

    try {
      synchronized (zooCache) {
        zooCache.clear();
        IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
        for (String user : zooCache.getChildren(ZKUserPath))
          zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table, NodeMissingPolicy.SKIP);
      }
    } catch (KeeperException e) {
      log.error(e, e);
      throw new AccumuloSecurityException("unknownUser", SecurityErrorCode.CONNECTION_ERROR, e);
    } catch (InterruptedException e) {
View Full Code Here

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

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

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

  public void cleanUser(String user) throws AccumuloSecurityException {
    try {
      synchronized (zooCache) {
        IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
        zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserSysPerms, NodeMissingPolicy.SKIP);
        zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms, 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()

      // 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(), NodeExistsPolicy.FAIL);
View Full Code Here

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()

          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.fate.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.fate.zookeeper.IZooReaderWriter.recursiveDelete()

        while (true) {
          try {
            IZooReaderWriter zoo = ZooReaderWriter.getInstance();
            if (zoo.isLockHeld(zooLock.getLockID())) {
              String parts[] = entry.filename.split("/");
              zoo.recursiveDelete(root + "/" + parts[parts.length - 1], NodeMissingPolicy.SKIP);
            }
            break;
          } catch (Exception e) {
            log.error(e, e);
          }
View Full Code Here

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

        if (accumuloPersistentVersion == ServerConstants.TWO_DATA_VERSIONS_AGO) {
          log.debug("Handling updates for version " + ServerConstants.TWO_DATA_VERSIONS_AGO);

          log.debug("Cleaning out remnants of logger role.");
          zoo.recursiveDelete(zooRoot + "/loggers", NodeMissingPolicy.SKIP);
          zoo.recursiveDelete(zooRoot + "/dead/loggers", NodeMissingPolicy.SKIP);

          final byte[] zero = new byte[] {'0'};
          log.debug("Initializing recovery area.");
          zoo.putPersistentData(zooRoot + Constants.ZRECOVERY, zero, NodeExistsPolicy.SKIP);
View Full Code Here

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

        if (accumuloPersistentVersion == ServerConstants.TWO_DATA_VERSIONS_AGO) {
          log.debug("Handling updates for version " + ServerConstants.TWO_DATA_VERSIONS_AGO);

          log.debug("Cleaning out remnants of logger role.");
          zoo.recursiveDelete(zooRoot + "/loggers", NodeMissingPolicy.SKIP);
          zoo.recursiveDelete(zooRoot + "/dead/loggers", NodeMissingPolicy.SKIP);

          final byte[] zero = new byte[] {'0'};
          log.debug("Initializing recovery area.");
          zoo.putPersistentData(zooRoot + Constants.ZRECOVERY, zero, NodeExistsPolicy.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.