本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZKUtil.logZKTree()
方法的一些代码示例,展示了ZKUtil.logZKTree()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKUtil.logZKTree()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.zookeeper.ZKUtil
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!