org.apache.hadoop.hbase.zookeeper.ZKUtil.logZKTree()方法的使用及代码示例

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

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

ZKUtil.logZKTree介绍

[英]Recursively print the current state of ZK (non-transactional)
[中]递归打印ZK的当前状态(非事务性)

代码示例

代码示例来源:origin: apache/hbase

/**
 * Recursively print the current state of ZK (non-transactional)
 * @param root name of the root directory in zk to print
 */
public static void logZKTree(ZKWatcher zkw, String root) {
 if (!LOG.isDebugEnabled()) {
  return;
 }
 LOG.debug("Current zk system:");
 String prefix = "|-";
 LOG.debug(prefix + root);
 try {
  logZKTree(zkw, root, prefix);
 } catch (KeeperException e) {
  throw new RuntimeException(e);
 }
}

代码示例来源:origin: apache/hbase

/**
 * Helper method to print the current state of the ZK tree.
 * @see #logZKTree(ZKWatcher, String)
 * @throws KeeperException if an unexpected exception occurs
 */
protected static void logZKTree(ZKWatcher zkw, String root, String prefix)
  throws KeeperException {
 List<String> children = ZKUtil.listChildrenNoWatch(zkw, root);
 if (children == null) {
  return;
 }
 for (String child : children) {
  LOG.debug(prefix + child);
  String node = ZNodePaths.joinZNode(root.equals("/") ? "" : root, child);
  logZKTree(zkw, node, prefix + "---");
 }
}

代码示例来源:origin: co.cask.hbase/hbase

/**
 * Recursively print the current state of ZK (non-transactional)
 * @param root name of the root directory in zk to print
 * @throws KeeperException
 */
public static void logZKTree(ZooKeeperWatcher zkw, String root) {
 if (!LOG.isDebugEnabled()) return;
 LOG.debug("Current zk system:");
 String prefix = "|-";
 LOG.debug(prefix + root);
 try {
  logZKTree(zkw, root, prefix);
 } catch (KeeperException e) {
  throw new RuntimeException(e);
 }
}

代码示例来源:origin: org.apache.hbase/hbase-zookeeper

/**
 * Recursively print the current state of ZK (non-transactional)
 * @param root name of the root directory in zk to print
 */
public static void logZKTree(ZKWatcher zkw, String root) {
 if (!LOG.isDebugEnabled()) {
  return;
 }
 LOG.debug("Current zk system:");
 String prefix = "|-";
 LOG.debug(prefix + root);
 try {
  logZKTree(zkw, root, prefix);
 } catch (KeeperException e) {
  throw new RuntimeException(e);
 }
}

代码示例来源:origin: co.cask.hbase/hbase

/**
 * Helper method to print the current state of the ZK tree.
 * @see #logZKTree(ZooKeeperWatcher, String)
 * @throws KeeperException if an unexpected exception occurs
 */
protected static void logZKTree(ZooKeeperWatcher zkw, String root, String prefix) throws KeeperException {
 List<String> children = ZKUtil.listChildrenNoWatch(zkw, root);
 if (children == null) return;
 for (String child : children) {
  LOG.debug(prefix + child);
  String node = ZKUtil.joinZNode(root.equals("/") ? "" : root, child);
  logZKTree(zkw, node, prefix + "---");
 }
}

代码示例来源:origin: org.apache.hbase/hbase-zookeeper

/**
 * Helper method to print the current state of the ZK tree.
 * @see #logZKTree(ZKWatcher, String)
 * @throws KeeperException if an unexpected exception occurs
 */
protected static void logZKTree(ZKWatcher zkw, String root, String prefix)
  throws KeeperException {
 List<String> children = ZKUtil.listChildrenNoWatch(zkw, root);
 if (children == null) {
  return;
 }
 for (String child : children) {
  LOG.debug(prefix + child);
  String node = ZNodePaths.joinZNode(root.equals("/") ? "" : root, child);
  logZKTree(zkw, node, prefix + "---");
 }
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Helper method to print the current state of the ZK tree.
 * @see #logZKTree(ZooKeeperWatcher, String)
 * @throws KeeperException if an unexpected exception occurs
 */
protected static void logZKTree(ZooKeeperWatcher zkw, String root, String prefix)
  throws KeeperException {
 List<String> children = ZKUtil.listChildrenNoWatch(zkw, root);
 if (children == null) return;
 for (String child : children) {
  LOG.debug(prefix + child);
  String node = ZKUtil.joinZNode(root.equals("/") ? "" : root, child);
  logZKTree(zkw, node, prefix + "---");
 }
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Recursively print the current state of ZK (non-transactional)
 * @param root name of the root directory in zk to print
 */
public static void logZKTree(ZooKeeperWatcher zkw, String root) {
 if (!LOG.isDebugEnabled()) return;
 LOG.debug("Current zk system:");
 String prefix = "|-";
 LOG.debug(prefix + root);
 try {
  logZKTree(zkw, root, prefix);
 } catch (KeeperException e) {
  throw new RuntimeException(e);
 }
}

相关文章

微信公众号

最新文章

更多