gpt4 book ai didi

org.apache.accumulo.fate.zookeeper.ZooReader.exists()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 07:19:31 27 4
gpt4 key购买 nike

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

ZooReader.exists介绍

暂无

代码示例

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

protected void updateHostsFromZooKeeper() throws KeeperException, InterruptedException {
 if (pathExists || zoo.exists(path)) {
  pathExists = true;
  updateHosts(path, zoo.getChildren(path, this));
 } else {
  zoo.exists(path, this);
 }
}

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

/**
 * Entry point to seed the local {@link AuthenticationKey} cache from ZooKeeper and set the first
 * watcher for future updates in ZooKeeper.
 */
public void updateAuthKeys() throws KeeperException, InterruptedException {
 // Might cause two watchers on baseNode, but only at startup for each tserver.
 if (zk.exists(baseNode, this)) {
  log.info("Added {} existing AuthenticationKeys to local cache from ZooKeeper",
    updateAuthKeys(baseNode));
 }
}

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

@Override
 public boolean transactionComplete(String type, long tid) throws Exception {
  String path = context.getZooKeeperRoot() + "/" + type + "/" + tid + "-running";
  rdr.sync(path);
  return !rdr.exists(path);
 }
}

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

@Override
public boolean transactionAlive(String type, long tid) throws Exception {
 String path = context.getZooKeeperRoot() + "/" + type + "/" + tid;
 rdr.sync(path);
 return rdr.exists(path);
}

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

@Override
public boolean isPropertySet(Property prop, boolean cacheAndWatch) {
 if (fixedProps.containsKey(prop.getKey())) {
  return true;
 }
 if (cacheAndWatch) {
  if (getRaw(prop.getKey()) != null) {
   return true;
  }
 } else {
  ZooReader zr = context.getZooReaderWriter();
  String zPath = propPathPrefix + "/" + prop.getKey();
  try {
   if (zr.exists(zPath)) {
    return true;
   }
  } catch (KeeperException | InterruptedException e) {
   throw new IllegalStateException(e);
  }
 }
 return parent.isPropertySet(prop, cacheAndWatch);
}

代码示例来源:origin: org.apache.accumulo/accumulo-tracer

protected void updateHostsFromZooKeeper() throws KeeperException, InterruptedException {
 if (pathExists || zoo.exists(path)) {
  pathExists = true;
  updateHosts(path, zoo.getChildren(path, this));
 } else {
  zoo.exists(path, this);
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

/**
 * Entry point to seed the local {@link AuthenticationKey} cache from ZooKeeper and set the first
 * watcher for future updates in ZooKeeper.
 */
public void updateAuthKeys() throws KeeperException, InterruptedException {
 // Might cause two watchers on baseNode, but only at startup for each tserver.
 if (zk.exists(baseNode, this)) {
  log.info("Added {} existing AuthenticationKeys to local cache from ZooKeeper",
    updateAuthKeys(baseNode));
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-server

@Override
public boolean transactionAlive(String type, long tid) throws Exception {
 String path = ZooUtil.getRoot(instance) + "/" + type + "/" + tid;
 rdr.sync(path);
 return rdr.exists(path);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

@Override
 public boolean transactionComplete(String type, long tid) throws Exception {
  String path = ZooUtil.getRoot(instance) + "/" + type + "/" + tid + "-running";
  rdr.sync(path);
  return !rdr.exists(path);
 }
}

代码示例来源:origin: org.apache.accumulo/accumulo-server-base

@Override
public boolean transactionAlive(String type, long tid) throws Exception {
 String path = ZooUtil.getRoot(instance) + "/" + type + "/" + tid;
 rdr.sync(path);
 return rdr.exists(path);
}

代码示例来源:origin: org.apache.accumulo/accumulo-server

@Override
 public boolean transactionComplete(String type, long tid) throws Exception {
  String path = ZooUtil.getRoot(instance) + "/" + type + "/" + tid + "-running";
  rdr.sync(path);
  return !rdr.exists(path);
 }
}

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