com.ngdata.sep.util.zookeeper.ZkUtil.deleteNode()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(126)

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

ZkUtil.deleteNode介绍

[英]Deletes a path (non-recursively) in ZooKeeper, if it exists.

If the path doesn't exist, the delete will fail silently. The delete operation is retried until it succeeds, or until it fails with a non-recoverable error.

If the path has children, the operation will fail with the underlying NotEmptyException.
[中]删除ZooKeeper中存在的路径(非递归)。
如果路径不存在,删除操作将以静默方式失败。删除操作将重试,直到成功,或者失败并出现不可恢复的错误。
如果路径有子级,则操作将失败,并出现底层NotEmptyException。

代码示例

代码示例来源:origin: NGDATA/hbase-indexer

ZkUtil.deleteNode(zk, basePath + "/hbaseid");
  for (String child : zk.getChildren(basePath + "/rs", false)) {
    ZkUtil.deleteNode(zk, basePath + "/rs/" + child);
  ZkUtil.deleteNode(zk, basePath + "/rs");
  ZkUtil.deleteNode(zk, basePath);
} catch (InterruptedException ie) {
  Thread.currentThread().interrupt();

代码示例来源:origin: com.ngdata/hbase-sep-impl-common

ZkUtil.deleteNode(zk, basePath + "/hbaseid");
  for (String child : zk.getChildren(basePath + "/rs", false)) {
    ZkUtil.deleteNode(zk, basePath + "/rs/" + child);
  ZkUtil.deleteNode(zk, basePath + "/rs");
  ZkUtil.deleteNode(zk, basePath);
} catch (InterruptedException ie) {
  Thread.currentThread().interrupt();

相关文章

微信公众号

最新文章

更多