gpt4 book ai didi

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

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

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

ZooStore.<init>介绍

暂无

代码示例

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

final ReadOnlyTStore<ServerUtil> fate = new ReadOnlyStore<>(new ZooStore<>(
  context.getZooKeeperRoot() + Constants.ZFATE, context.getZooReaderWriter()));
if (!(fate.list().isEmpty())) {

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

IZooReaderWriter zk = getZooReaderWriter(context, siteConfig,
  cl.getOptionValue(secretOption.getOpt()));
ZooStore<FateCommand> zs = new ZooStore<>(path, zk);

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

String masterPath = zkRoot + Constants.ZMASTER_LOCK;
IZooReaderWriter zk = context.getZooReaderWriter();
ZooStore<Master> zs = new ZooStore<>(path, zk);

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

final AgeOffStore<Master> store = new AgeOffStore<>(new org.apache.accumulo.fate.ZooStore<>(
  getZooKeeperRoot() + Constants.ZFATE, context.getZooReaderWriter()), 1000 * 60 * 60 * 8);

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

/**
  * Exit loudly if there are outstanding Fate operations. Since Fate serializes class names, we need to make sure there are no queued transactions from a
  * previous version before continuing an upgrade. The status of the operations is irrelevant; those in SUCCESSFUL status cause the same problem as those just
  * queued.
  *
  * Note that the Master should not allow write access to Fate until after all upgrade steps are complete.
  *
  * Should be called as a guard before performing any upgrade steps, after determining that an upgrade is needed.
  *
  * see ACCUMULO-2519
  */
 public static void abortIfFateTransactions() {
  try {
   final ReadOnlyTStore<Accumulo> fate = new ReadOnlyStore<Accumulo>(new ZooStore<Accumulo>(
     ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZFATE, ZooReaderWriter.getRetryingInstance()));
   if (!(fate.list().isEmpty())) {
    throw new AccumuloException("Aborting upgrade because there are outstanding FATE transactions from a previous Accumulo version. "
      + "Please see the README document for instructions on what to do under your previous version.");
   }
  } catch (Exception exception) {
   log.fatal("Problem verifying Fate readiness", exception);
   System.exit(1);
  }
 }
}

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

try {
 final ReadOnlyTStore<Accumulo> fate = new ReadOnlyStore<>(
   new ZooStore<Accumulo>(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZFATE,
     ZooReaderWriter.getInstance()));
 if (!(fate.list().isEmpty())) {

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

IZooReaderWriter zk = getZooReaderWriter(shellState.getInstance(),
  cl.getOptionValue(secretOption.getOpt()));
ZooStore<FateCommand> zs = new ZooStore<>(path, zk);

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

String masterPath = ZooUtil.getRoot(instance) + Constants.ZMASTER_LOCK;
IZooReaderWriter zk = ZooReaderWriter.getInstance();
ZooStore<Master> zs = new ZooStore<>(path, zk);

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

String masterPath = ZooUtil.getRoot(instance) + Constants.ZMASTER_LOCK;
IZooReaderWriter zk = ZooReaderWriter.getRetryingInstance();
ZooStore<Master> zs = new ZooStore<Master>(path, zk);

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

private static FateStatus getFateStatus(Instance instance, AccumuloCluster cluster) {
  try {
   AdminUtil<String> admin = new AdminUtil<>(false);
   String secret = cluster.getSiteConfiguration().get(Property.INSTANCE_SECRET);
   IZooReaderWriter zk = new ZooReaderWriterFactory().getZooReaderWriter(
     instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut(), secret);
   ZooStore<String> zs = new ZooStore<>(ZooUtil.getRoot(instance) + Constants.ZFATE, zk);
   FateStatus fateStatus = admin.getStatus(zs, zk,
     ZooUtil.getRoot(instance) + Constants.ZTABLE_LOCKS, null, null);
   return fateStatus;
  } catch (KeeperException | InterruptedException e) {
   throw new RuntimeException(e);
  }
 }
}

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

/**
 * Checks fates in zookeeper looking for transaction associated with a compaction as a double
 * check that the test will be valid because the running compaction does have a fate transaction
 * lock.
 *
 * @return true if corresponding fate transaction found, false otherwise
 */
private boolean findFate(final String tableName) {
 Instance instance = connector.getInstance();
 AdminUtil<String> admin = new AdminUtil<>(false);
 try {
  String tableId = Tables.getTableId(instance, tableName);
  log.trace("tid: {}", tableId);
  String secret = cluster.getSiteConfiguration().get(Property.INSTANCE_SECRET);
  IZooReaderWriter zk = new ZooReaderWriterFactory().getZooReaderWriter(
    instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut(), secret);
  ZooStore<String> zs = new ZooStore<>(ZooUtil.getRoot(instance) + Constants.ZFATE, zk);
  AdminUtil.FateStatus fateStatus = admin.getStatus(zs, zk,
    ZooUtil.getRoot(instance) + Constants.ZTABLE_LOCKS + "/" + tableId, null, null);
  for (AdminUtil.TransactionStatus tx : fateStatus.getTransactions()) {
   if (tx.getTop().contains("CompactionDriver") && tx.getDebug().contains("CompactRange")) {
    return true;
   }
  }
 } catch (KeeperException | TableNotFoundException | InterruptedException ex) {
  throw new IllegalStateException(ex);
 }
 // did not find appropriate fate transaction for compaction.
 return Boolean.FALSE;
}

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

final AgeOffStore<Master> store = new AgeOffStore<Master>(new org.apache.accumulo.fate.ZooStore<Master>(ZooUtil.getRoot(instance) + Constants.ZFATE,
  ZooReaderWriter.getRetryingInstance()), 1000 * 60 * 60 * 8);

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

new org.apache.accumulo.fate.ZooStore<Master>(
  ZooUtil.getRoot(getInstance()) + Constants.ZFATE, ZooReaderWriter.getInstance()),
1000 * 60 * 60 * 8);

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