gpt4 book ai didi

org.apache.hadoop.registry.client.impl.zk.ZKPathDumper类的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 04:33:31 26 4
gpt4 key购买 nike

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

ZKPathDumper介绍

[英]This class dumps a registry tree to a string. It does this in the toString() method, so it can be used in a log statement -the operation will only take place if the method is evaluated.
[中]此类将注册表树转储为字符串。它在toString()方法中执行此操作,因此可以在日志语句中使用它——只有在对该方法求值时,才会执行该操作。

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Diagnostics method to dump a registry robustly.
 * Any exception raised is swallowed.
 *
 * @param verbose verbose path dump
 * @return the registry tree
 */
protected String dumpRegistryRobustly(boolean verbose) {
 try {
  ZKPathDumper pathDumper = dumpPath(verbose);
  return pathDumper.toString();
 } catch (Exception e) {
  // ignore
  LOG.debug("Ignoring exception:  {}", e);
 }
 return "";
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Return a path dumper instance which can do a full dump
 * of the registry tree in its <code>toString()</code>
 * operation.
 *
 * @param verbose verbose flag - includes more details (such as ACLs)
 * @return a class to dump the registry
 */
public ZKPathDumper dumpPath(boolean verbose) {
 return new ZKPathDumper(curator, registryRoot, verbose);
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Trigger the recursive registry dump.
 * @return a string view of the registry
 */
@Override
public String toString() {
 StringBuilder builder = new StringBuilder();
 builder.append("ZK tree for ").append(root).append('\n');
 expand(builder, root, 1);
 return builder.toString();
}

代码示例来源:origin: io.hops/hadoop-yarn-registry

append(builder, indent, ' ');
builder.append('/').append(child);
builder.append(body);
builder.append('\n');
expand(builder, childPath, indent + INDENT);

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-registry

append(builder, indent, ' ');
builder.append('/').append(child);
builder.append(body);
builder.append('\n');
expand(builder, childPath, indent + INDENT);

代码示例来源:origin: io.hops/hadoop-yarn-registry

/**
  * Diagnostics method to dump a registry robustly.
  * Any exception raised is swallowed
  * @param verbose verbose path dump
  * @return the registry tree
  */
 protected String dumpRegistryRobustly(boolean verbose) {
  try {
   ZKPathDumper pathDumper = dumpPath(verbose);
   return pathDumper.toString();
  } catch (Exception e) {
   // ignore
   LOG.debug("Ignoring exception:  {}", e);
  }
  return "";
 }
}

代码示例来源:origin: io.hops/hadoop-yarn-registry

/**
 * Trigger the recursive registry dump.
 * @return a string view of the registry
 */
@Override
public String toString() {
 StringBuilder builder = new StringBuilder();
 builder.append("ZK tree for ").append(root).append('\n');
 expand(builder, root, 1);
 return builder.toString();
}

代码示例来源:origin: io.hops/hadoop-yarn-registry

/**
 * Return a path dumper instance which can do a full dump
 * of the registry tree in its <code>toString()</code>
 * operation
 * @return a class to dump the registry
 * @param verbose verbose flag - includes more details (such as ACLs)
 */
public ZKPathDumper dumpPath(boolean verbose) {
 return new ZKPathDumper(curator, registryRoot, verbose);
}

代码示例来源:origin: io.hops/hadoop-yarn-registry

/**
 * test that ZK can write as itself
 * @throws Throwable
 */
@Test
public void testZookeeperCanWriteUnderSystem() throws Throwable {
 RMRegistryOperationsService rmRegistryOperations =
   startRMRegistryOperations();
 RegistryOperations operations = rmRegistryOperations;
 operations.mknode(PATH_SYSTEM_SERVICES + "hdfs",
   false);
 ZKPathDumper pathDumper = rmRegistryOperations.dumpPath(true);
 LOG.info(pathDumper.toString());
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-registry

RegistrySecurity.WorldReadWriteACL);
 ZKPathDumper pathDumper = curator.dumpPath(true);
 LOG.info(pathDumper.toString());
} finally {
 logout(login);

代码示例来源:origin: io.hops/hadoop-yarn-registry

RegistrySecurity.WorldReadWriteACL);
 ZKPathDumper pathDumper = curator.dumpPath(true);
 LOG.info(pathDumper.toString());
} finally {
 logout(login);

代码示例来源:origin: io.hops/hadoop-yarn-registry

operations.mknode(base + "/subdir", false);
ZKPathDumper pathDumper = registryAdmin.dumpPath(true);
LOG.info(pathDumper.toString());

代码示例来源:origin: io.hops/hadoop-yarn-registry

LOG.info(pathDumper.toString());

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