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