org.apache.hadoop.hive.thrift.ZooKeeperTokenStore.ensurePath()方法的使用及代码示例

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

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

ZooKeeperTokenStore.ensurePath介绍

[英]Create a path if it does not already exist ("mkdir -p")
[中]如果路径不存在,请创建路径(“mkdir-p”)

代码示例

代码示例来源:origin: com.github.hyukjinkwon.shims/hive-shims-common

private void initClientAndPaths() {
 if (this.zkSession != null) {
  this.zkSession.close();
 }
 try {
  ensurePath(rootNode + NODE_KEYS, newNodeAcl);
  ensurePath(rootNode + NODE_TOKENS, newNodeAcl);
 } catch (TokenStoreException e) {
  throw e;
 }
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

private void initClientAndPaths() {
 if (this.zkSession != null) {
  this.zkSession.close();
 }
 try {
  ensurePath(rootNode + NODE_KEYS, newNodeAcl);
  ensurePath(rootNode + NODE_TOKENS, newNodeAcl);
 } catch (TokenStoreException e) {
  throw e;
 }
}

代码示例来源:origin: org.apache.hive.shims/hive-shims-common-secure

private void initClientAndPaths() {
 if (this.zkSession != null) {
  this.zkSession.close();
 }
 try {
  ensurePath(rootNode + NODE_KEYS, newNodeAcl);
  ensurePath(rootNode + NODE_TOKENS, newNodeAcl);
 } catch (TokenStoreException e) {
  throw e;
 }
}

代码示例来源:origin: org.spark-project.hive.shims/hive-shims-common-secure

private void init() {
 if (this.zkConnectString == null) {
  throw new IllegalStateException("Not initialized");
 }
 if (this.zkSession != null) {
  try {
   this.zkSession.close();
  } catch (InterruptedException ex) {
   LOGGER.warn("Failed to close existing session.", ex);
  }
 }
 ZooKeeper zk = getSession();
 try {
   ensurePath(zk, rootNode + NODE_KEYS, newNodeAcl);
   ensurePath(zk, rootNode + NODE_TOKENS, newNodeAcl);
  } catch (Exception e) {
   throw new TokenStoreException("Failed to validate token path.", e);
  }
}

相关文章