List<Long> transactions = zs.list(); List<TransactionStatus> statuses = new ArrayList<>(transactions.size()); zs.reserve(tid); String debug = (String) zs.getProperty(tid, "debug"); ReadOnlyRepo<T> repo = zs.top(tid); if (repo != null) top = repo.getDescription(); status = zs.getStatus(tid); zs.unreserve(tid, 0);
final ReadOnlyTStore<ServerUtil> fate = new ReadOnlyStore<>(new ZooStore<>( context.getZooKeeperRoot() + Constants.ZFATE, context.getZooReaderWriter())); if (!(fate.list().isEmpty())) { throw new AccumuloException("Aborting upgrade because there are" + " outstanding FATE transactions from a previous Accumulo version."
/** * 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); } } }
List<Long> transactions = zs.list(); List<TransactionStatus> statuses = new ArrayList<>(transactions.size()); zs.reserve(tid); String debug = (String) zs.getProperty(tid, "debug"); ReadOnlyRepo<T> repo = zs.top(tid); if (repo != null) top = repo.getDescription(); status = zs.getStatus(tid); zs.unreserve(tid, 0);
new ZooStore<Accumulo>(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZFATE, ZooReaderWriter.getInstance())); if (!(fate.list().isEmpty())) { throw new AccumuloException("Aborting upgrade because there are" + " outstanding FATE transactions from a previous Accumulo version."