- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.fluo.accumulo.util.ZookeeperUtil.getGcTimestamp()
方法的一些代码示例,展示了ZookeeperUtil.getGcTimestamp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZookeeperUtil.getGcTimestamp()
方法的具体详情如下:
包路径:org.apache.fluo.accumulo.util.ZookeeperUtil
类名称:ZookeeperUtil
方法名:getGcTimestamp
[英]Retrieves the GC timestamp, set by the Oracle, from zookeeper
[中]从zookeeper检索由Oracle设置的GC时间戳
代码示例来源:origin: apache/fluo
private void waitForGcTime(long expectedTime) throws Exception {
env.getSharedResources().getTimestampTracker().updateZkNode();
long oldestTs = ZookeeperUtil.getGcTimestamp(config.getAppZookeepers());
while (oldestTs < expectedTime) {
Thread.sleep(500);
oldestTs = ZookeeperUtil.getGcTimestamp(config.getAppZookeepers());
}
}
代码示例来源:origin: apache/fluo
@Override
public void init(SortedKeyValueIterator<Key, Value> source, Map<String, String> options,
IteratorEnvironment env) throws IOException {
if (env.getIteratorScope() == IteratorScope.scan) {
throw new IllegalArgumentException();
}
this.source = source;
isFullMajc = env.getIteratorScope() == IteratorScope.majc && env.isFullMajorCompaction();
String oats = options.get(GC_TIMESTAMP_OPT);
if (oats != null) {
gcTimestamp = Long.valueOf(oats);
} else {
String zookeepers = options.get(ZOOKEEPER_CONNECT_OPT);
if (zookeepers == null) {
throw new IllegalArgumentException("A configuration item for GC iterator was not set");
}
gcTimestamp = ZookeeperUtil.getGcTimestamp(zookeepers);
}
}
代码示例来源:origin: apache/fluo
@Test
public void testGetOldestTimestamp() throws Exception {
// we are expecting an error in this test
final Level curLevel = Logger.getLogger(ZookeeperUtil.class).getLevel();
Logger.getLogger(ZookeeperUtil.class).setLevel(Level.FATAL);
// verify that oracle initial current ts
Assert.assertEquals(0, ZookeeperUtil.getGcTimestamp(config.getAppZookeepers()));
// delete the oracle current timestamp path
env.getSharedResources().getCurator().delete().forPath(ZookeeperPath.ORACLE_GC_TIMESTAMP);
// verify that oldest possible is returned
Assert.assertEquals(ZookeeperUtil.OLDEST_POSSIBLE,
ZookeeperUtil.getGcTimestamp(config.getAppZookeepers()));
// set level back
Logger.getLogger(ZookeeperUtil.class).setLevel(curLevel);
}
代码示例来源:origin: apache/fluo
long oldestTS = ZookeeperUtil.getGcTimestamp(config.getAppZookeepers());
oldestTS = ZookeeperUtil.getGcTimestamp(config.getAppZookeepers());
代码示例来源:origin: apache/fluo
LongUtil.toByteArray(nextTs));
long gcTs = ZookeeperUtil.getGcTimestamp(config.getAppZookeepers());
while (gcTs < nextTs) {
Thread.sleep(500);
gcTs = ZookeeperUtil.getGcTimestamp(config.getAppZookeepers());
代码示例来源:origin: apache/fluo
public void testVerifyAfterGC() throws Exception {
final TestTransaction tx1 = new TestTransaction(env);
BankUtil.setBalance(tx1, "bob", 10);
BankUtil.setBalance(tx1, "joe", 20);
BankUtil.setBalance(tx1, "jill", 60);
tx1.done();
BankUtil.transfer(env, "joe", "jill", 1);
BankUtil.transfer(env, "joe", "bob", 1);
BankUtil.transfer(env, "bob", "joe", 2);
BankUtil.transfer(env, "jill", "joe", 2);
final TestTransaction tx2 = new TestTransaction(env);
waitForGcTime(tx2.getStartTimestamp());
long oldestTs = ZookeeperUtil.getGcTimestamp(config.getAppZookeepers());
Assert.assertEquals(tx2.getStartTs(), oldestTs);
// Force a garbage collection
aClient.tableOperations().flush(table, null, null, true);
verify(oldestTs);
final TestTransaction tx3 = new TestTransaction(env);
Assert.assertEquals(9, BankUtil.getBalance(tx3, "bob"));
Assert.assertEquals(22, BankUtil.getBalance(tx3, "joe"));
Assert.assertEquals(59, BankUtil.getBalance(tx3, "jill"));
tx3.done();
tx2.done();
}
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getSubstitutedPath()方法的一些代码示例,展示了ZooKeeperUtils.
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.setData()方法的一些代码示例,展示了ZooKeeperUtils.setData()的具
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.deleteSafe()方法的一些代码示例,展示了ZooKeeperUtils.deleteSa
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getContainerLogin()方法的一些代码示例,展示了ZooKeeperUtils.g
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getSubstitutedData()方法的一些代码示例,展示了ZooKeeperUtils.
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.isContainerLogin()方法的一些代码示例,展示了ZooKeeperUtils.is
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getData()方法的一些代码示例,展示了ZooKeeperUtils.getData()的具
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.create()方法的一些代码示例,展示了ZooKeeperUtils.create()的具体用
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getStringData()方法的一些代码示例,展示了ZooKeeperUtils.getSt
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getByteData()方法的一些代码示例,展示了ZooKeeperUtils.getByte
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getAllChildren()方法的一些代码示例,展示了ZooKeeperUtils.getA
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.generateContainerToken()方法的一些代码示例,展示了ZooKeeperUt
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getChildrenSafe()方法的一些代码示例,展示了ZooKeeperUtils.get
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.delete()方法的一些代码示例,展示了ZooKeeperUtils.delete()的具体用
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getContainerTokens()方法的一些代码示例,展示了ZooKeeperUtils.
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.exists()方法的一些代码示例,展示了ZooKeeperUtils.exists()的具体用
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.createDefault()方法的一些代码示例,展示了ZooKeeperUtils.creat
本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getChildren()方法的一些代码示例,展示了ZooKeeperUtils.getChil
本文整理了Java中com.twitter.common.zookeeper.ZooKeeperUtils.ensurePath()方法的一些代码示例,展示了ZooKeeperUtils.ensure
本文整理了Java中org.apache.flink.runtime.util.ZooKeeperUtils.createCheckpointIDCounter()方法的一些代码示例,展示了ZooKe
我是一名优秀的程序员,十分优秀!