gpt4 book ai didi

org.apache.accumulo.server.zookeeper.ZooReaderWriter.recursiveDelete()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 22:04:03 28 4
gpt4 key购买 nike

本文整理了Java中org.apache.accumulo.server.zookeeper.ZooReaderWriter.recursiveDelete()方法的一些代码示例,展示了ZooReaderWriter.recursiveDelete()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooReaderWriter.recursiveDelete()方法的具体详情如下:
包路径:org.apache.accumulo.server.zookeeper.ZooReaderWriter
类名称:ZooReaderWriter
方法名:recursiveDelete

ZooReaderWriter.recursiveDelete介绍

暂无

代码示例

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

void removeFromZooKeeper(ZooReaderWriter zoorw, Instance instance)
  throws IOException, KeeperException, InterruptedException {
 String zpath = getZPath(instance);
 zoorw.recursiveDelete(zpath, NodeMissingPolicy.SKIP);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

public void removeTable(String tableId) throws KeeperException, InterruptedException {
 synchronized (tableStateCache) {
  tableStateCache.remove(tableId);
  ZooReaderWriter.getInstance().recursiveDelete(
    ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE,
    NodeMissingPolicy.SKIP);
  ZooReaderWriter.getInstance().recursiveDelete(
    ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId, NodeMissingPolicy.SKIP);
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

public void removeNamespace(String namespaceId) throws KeeperException, InterruptedException {
 ZooReaderWriter.getInstance().recursiveDelete(
   ZooUtil.getRoot(instance) + Constants.ZNAMESPACES + "/" + namespaceId,
   NodeMissingPolicy.SKIP);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

public static void removeNamespaceProperty(String namespaceId, String property)
  throws InterruptedException, KeeperException {
 String zPath = getPath(namespaceId) + "/" + property;
 ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.SKIP);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server

public static void removeTableProperty(String tableId, String property) throws InterruptedException, KeeperException {
 String zPath = getTablePath(tableId) + "/" + property;
 ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.SKIP);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

public static void removeTableProperty(String tableId, String property)
  throws InterruptedException, KeeperException {
 String zPath = getTablePath(tableId) + "/" + property;
 ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.SKIP);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server

void removeFromZooKeeper() throws Exception {
 String zpath = getZPath();
 ZooReaderWriter.getInstance().recursiveDelete(zpath, NodeMissingPolicy.SKIP);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server

zoo.recursiveDelete(childPath, NodeMissingPolicy.SKIP);
 } catch (Exception e) {
  log.error("Error received when trying to delete entry in zookeeper " + childPath, e);
 zoo.recursiveDelete(lockPath, NodeMissingPolicy.SKIP);
} catch (Exception e) {
 log.error("Error received when trying to delete entry in zookeeper " + childPath, e);

代码示例来源:origin: org.apache.accumulo/accumulo-server

public void clearMergeState(Text tableId) throws IOException, KeeperException, InterruptedException {
 synchronized (mergeLock) {
  String path = ZooUtil.getRoot(instance.getInstanceID()) + Constants.ZTABLES + "/" + tableId.toString() + "/merge";
  ZooReaderWriter.getInstance().recursiveDelete(path, NodeMissingPolicy.SKIP);
  mergeLock.notifyAll();
 }
 nextEvent.event("Merge state of %s cleared", tableId);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server

public static void removeSystemProperty(String property) throws InterruptedException, KeeperException {
  String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;
  ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.FAIL);
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

public static void removeSystemProperty(String property)
   throws InterruptedException, KeeperException {
  String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/"
    + property;
  ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.FAIL);
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

public void forget(TServerInstance instance) throws WalMarkerException {
 String path = root() + "/" + instance.toString();
 try {
  zoo.recursiveDelete(path, NodeMissingPolicy.FAIL);
 } catch (InterruptedException | KeeperException e) {
  throw new WalMarkerException(e);
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-master

public void clearMergeState(String tableId)
  throws IOException, KeeperException, InterruptedException {
 synchronized (mergeLock) {
  String path = ZooUtil.getRoot(getInstance().getInstanceID()) + Constants.ZTABLES + "/"
    + tableId + "/merge";
  ZooReaderWriter.getInstance().recursiveDelete(path, NodeMissingPolicy.SKIP);
  mergeLock.notifyAll();
 }
 nextEvent.event("Merge state of %s cleared", tableId);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

public synchronized void remove(TServerInstance server) {
  String zPath = null;
  for (Entry<String,TServerInfo> entry : current.entrySet()) {
   if (entry.getValue().instance.equals(server)) {
    zPath = entry.getKey();
    break;
   }
  }
  if (zPath == null)
   return;
  current.remove(zPath);
  currentInstances.remove(server);

  log.info("Removing zookeeper lock for " + server);
  String fullpath = ZooUtil.getRoot(context.getInstance()) + Constants.ZTSERVERS + "/" + zPath;
  try {
   ZooReaderWriter.getInstance().recursiveDelete(fullpath, SKIP);
  } catch (Exception e) {
   String msg = "error removing tablet server lock";
   // ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility
   log.error("FATAL: {}", msg, e);
   Halt.halt(msg, -1);
  }
  getZooCache().clear(fullpath);
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

@Override
public void dropUser(String user) throws AccumuloSecurityException {
 try {
  synchronized (zooCache) {
   zooCache.clear();
   ZooReaderWriter.getInstance().recursiveDelete(ZKUserPath + "/" + user,
     NodeMissingPolicy.FAIL);
  }
 } catch (InterruptedException e) {
  log.error("{}", e.getMessage(), e);
  throw new RuntimeException(e);
 } catch (KeeperException e) {
  if (e.code().equals(KeeperException.Code.NONODE)) {
   throw new AccumuloSecurityException(user, SecurityErrorCode.USER_DOESNT_EXIST, e);
  }
  log.error("{}", e.getMessage(), e);
  throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

public void cloneTable(String srcTable, String tableId, String tableName, String namespaceId,
  Map<String,String> propertiesToSet, Set<String> propertiesToExclude,
  NodeExistsPolicy existsPolicy) throws KeeperException, InterruptedException {
 prepareNewTableState(instance.getInstanceID(), tableId, namespaceId, tableName, TableState.NEW,
   existsPolicy);
 String srcTablePath = Constants.ZROOT + "/" + instance.getInstanceID() + Constants.ZTABLES + "/"
   + srcTable + Constants.ZTABLE_CONF;
 String newTablePath = Constants.ZROOT + "/" + instance.getInstanceID() + Constants.ZTABLES + "/"
   + tableId + Constants.ZTABLE_CONF;
 ZooReaderWriter.getInstance().recursiveCopyPersistent(srcTablePath, newTablePath,
   NodeExistsPolicy.OVERWRITE);
 for (Entry<String,String> entry : propertiesToSet.entrySet())
  TablePropUtil.setTableProperty(tableId, entry.getKey(), entry.getValue());
 for (String prop : propertiesToExclude)
  ZooReaderWriter.getInstance().recursiveDelete(Constants.ZROOT + "/" + instance.getInstanceID()
    + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_CONF + "/" + prop,
    NodeMissingPolicy.SKIP);
 updateTableStateCache(tableId);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server

orig.recursiveDelete(path, NodeMissingPolicy.SKIP);
new_.putPersistentData(path, newInstanceId.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);
return newInstanceId;

代码示例来源:origin: org.apache.accumulo/accumulo-server

public void setMergeState(MergeInfo info, MergeState state) throws IOException, KeeperException, InterruptedException {
 synchronized (mergeLock) {
  String path = ZooUtil.getRoot(instance.getInstanceID()) + Constants.ZTABLES + "/" + info.getRange().getTableId().toString() + "/merge";
  info.setState(state);
  if (state.equals(MergeState.NONE)) {
   ZooReaderWriter.getInstance().recursiveDelete(path, NodeMissingPolicy.SKIP);
  } else {
   DataOutputBuffer out = new DataOutputBuffer();
   try {
    info.write(out);
   } catch (IOException ex) {
    throw new RuntimeException("Unlikely", ex);
   }
   ZooReaderWriter.getInstance().putPersistentData(path, out.getData(),
     state.equals(MergeState.STARTED) ? ZooUtil.NodeExistsPolicy.FAIL : ZooUtil.NodeExistsPolicy.OVERWRITE);
  }
  mergeLock.notifyAll();
 }
 nextEvent.event("Merge state of %s set to %s", info.getRange(), state);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

orig.recursiveDelete(path, NodeMissingPolicy.SKIP);
new_.putPersistentData(path, newInstanceId.getBytes(UTF_8), NodeExistsPolicy.OVERWRITE);

代码示例来源:origin: org.apache.accumulo/accumulo-master

public void setMergeState(MergeInfo info, MergeState state)
  throws IOException, KeeperException, InterruptedException {
 synchronized (mergeLock) {
  String path = ZooUtil.getRoot(getInstance().getInstanceID()) + Constants.ZTABLES + "/"
    + info.getExtent().getTableId() + "/merge";
  info.setState(state);
  if (state.equals(MergeState.NONE)) {
   ZooReaderWriter.getInstance().recursiveDelete(path, NodeMissingPolicy.SKIP);
  } else {
   DataOutputBuffer out = new DataOutputBuffer();
   try {
    info.write(out);
   } catch (IOException ex) {
    throw new RuntimeException("Unlikely", ex);
   }
   ZooReaderWriter.getInstance().putPersistentData(path, out.getData(),
     state.equals(MergeState.STARTED) ? ZooUtil.NodeExistsPolicy.FAIL
       : ZooUtil.NodeExistsPolicy.OVERWRITE);
  }
  mergeLock.notifyAll();
 }
 nextEvent.event("Merge state of %s set to %s", info.getExtent(), state);
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com