Tabnine Logo
org.apache.cassandra.db.lifecycle
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.cassandra.db.lifecycle

Best Java code snippets using org.apache.cassandra.db.lifecycle (Showing top 20 results out of 315)

origin: jsevellec/cassandra-unit

/**
 * construct a Transaction for use in an offline operation
 */
public static LifecycleTransaction offline(OperationType operationType, Iterable<SSTableReader> readers)
{
  // if offline, for simplicity we just use a dummy tracker
  Tracker dummy = new Tracker(null, false);
  dummy.addInitialSSTables(readers);
  dummy.apply(updateCompacting(emptySet(), readers));
  return new LifecycleTransaction(dummy, operationType, readers);
}
origin: org.apache.cassandra/cassandra-all

@Override
protected Throwable doPostCleanup(Throwable accumulate)
{
  log.close();
  return unmarkCompacting(marked, accumulate);
}
origin: jsevellec/cassandra-unit

void delete()
{
  LogTransaction.delete(file);
  syncDirectory();
}
origin: org.apache.cassandra/cassandra-all

private Throwable unmarkCompacting(Set<SSTableReader> unmark, Throwable accumulate)
{
  accumulate = tracker.apply(updateCompacting(unmark, emptySet()), accumulate);
  // when the CFS is invalidated, it will call unreferenceSSTables().  However, unreferenceSSTables only deals
  // with sstables that aren't currently being compacted.  If there are ongoing compactions that finish or are
  // interrupted after the CFS is invalidated, those sstables need to be unreferenced as well, so we do that here.
  accumulate = tracker.dropSSTablesIfInvalid(accumulate);
  return accumulate;
}
origin: jsevellec/cassandra-unit

void readTxnLog(LogFile txn)
{
  if (!txn.verify() && onTxnErr == OnTxnErr.THROW)
    throw new LogTransaction.CorruptTransactionLogException("Some records failed verification. See earlier in log for details.", txn);
}
origin: jsevellec/cassandra-unit

void setError(LogRecord record, String error)
{
  record.setError(error);
  setErrorInReplicas(record);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

private boolean isLastRecordValidWithType(Type type)
{
  LogRecord lastRecord = getLastRecord();
  return lastRecord != null &&
      lastRecord.type == type &&
      lastRecord.isValid();
}
origin: org.apache.cassandra/cassandra-all

/**
 * construct a Transaction for use in an offline operation
 */
public static LifecycleTransaction offline(OperationType operationType, Iterable<SSTableReader> readers)
{
  // if offline, for simplicity we just use a dummy tracker
  Tracker dummy = new Tracker(null, false);
  dummy.addInitialSSTables(readers);
  dummy.apply(updateCompacting(emptySet(), readers));
  return new LifecycleTransaction(dummy, operationType, readers);
}
origin: jsevellec/cassandra-unit

private Throwable unmarkCompacting(Set<SSTableReader> unmark, Throwable accumulate)
{
  accumulate = tracker.apply(updateCompacting(unmark, emptySet()), accumulate);
  // when the CFS is invalidated, it will call unreferenceSSTables().  However, unreferenceSSTables only deals
  // with sstables that aren't currently being compacted.  If there are ongoing compactions that finish or are
  // interrupted after the CFS is invalidated, those sstables need to be unreferenced as well, so we do that here.
  accumulate = tracker.dropSSTablesIfInvalid(accumulate);
  return accumulate;
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

@Override
protected Throwable doPostCleanup(Throwable accumulate)
{
  log.close();
  return unmarkCompacting(marked, accumulate);
}
origin: com.strapdata.cassandra/cassandra-all

void readTxnLog(LogFile txn)
{
  if (!txn.verify() && onTxnErr == OnTxnErr.THROW)
    throw new LogTransaction.CorruptTransactionLogException("Some records failed verification. See earlier in log for details.", txn);
}
origin: org.apache.cassandra/cassandra-all

void delete()
{
  LogTransaction.delete(file);
  syncDirectory();
}
origin: org.apache.cassandra/cassandra-all

void setError(LogRecord record, String error)
{
  record.setError(error);
  setErrorInReplicas(record);
}
origin: org.apache.cassandra/cassandra-all

private boolean isLastRecordValidWithType(Type type)
{
  LogRecord lastRecord = getLastRecord();
  return lastRecord != null &&
      lastRecord.type == type &&
      lastRecord.isValid();
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

/**
 * construct a Transaction for use in an offline operation
 */
public static LifecycleTransaction offline(OperationType operationType, Iterable<SSTableReader> readers)
{
  // if offline, for simplicity we just use a dummy tracker
  Tracker dummy = new Tracker(false);
  dummy.addInitialSSTables(readers);
  dummy.apply(updateCompacting(emptySet(), readers));
  return new LifecycleTransaction(dummy, operationType, readers);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

private Throwable unmarkCompacting(Set<SSTableReader> unmark, Throwable accumulate)
{
  accumulate = tracker.apply(updateCompacting(unmark, emptySet()), accumulate);
  // when the CFS is invalidated, it will call unreferenceSSTables().  However, unreferenceSSTables only deals
  // with sstables that aren't currently being compacted.  If there are ongoing compactions that finish or are
  // interrupted after the CFS is invalidated, those sstables need to be unreferenced as well, so we do that here.
  accumulate = tracker.dropSSTablesIfInvalid(accumulate);
  return accumulate;
}
origin: jsevellec/cassandra-unit

@Override
protected Throwable doPostCleanup(Throwable accumulate)
{
  log.close();
  return unmarkCompacting(marked, accumulate);
}
origin: org.apache.cassandra/cassandra-all

void readTxnLog(LogFile txn)
{
  if (!txn.verify() && onTxnErr == OnTxnErr.THROW)
    throw new LogTransaction.CorruptTransactionLogException("Some records failed verification. See earlier in log for details.", txn);
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * construct a Transaction for use in an offline operation
 */
public static LifecycleTransaction offline(OperationType operationType, Iterable<SSTableReader> readers)
{
  // if offline, for simplicity we just use a dummy tracker
  Tracker dummy = new Tracker(null, false);
  dummy.addInitialSSTables(readers);
  dummy.apply(updateCompacting(emptySet(), readers));
  return new LifecycleTransaction(dummy, operationType, readers);
}
origin: com.strapdata.cassandra/cassandra-all

private Throwable unmarkCompacting(Set<SSTableReader> unmark, Throwable accumulate)
{
  accumulate = tracker.apply(updateCompacting(unmark, emptySet()), accumulate);
  // when the CFS is invalidated, it will call unreferenceSSTables().  However, unreferenceSSTables only deals
  // with sstables that aren't currently being compacted.  If there are ongoing compactions that finish or are
  // interrupted after the CFS is invalidated, those sstables need to be unreferenced as well, so we do that here.
  accumulate = tracker.dropSSTablesIfInvalid(accumulate);
  return accumulate;
}
org.apache.cassandra.db.lifecycle

Most used classes

  • LifecycleTransaction
    IMPORTANT: When this object is involved in a transactional graph, for correct behaviour its commit M
  • Tracker
    Tracker tracks live View of data store for a table.
  • Helpers
  • LifecycleTransaction$ReaderState$Action
  • LifecycleTransaction$ReaderState
  • LogAwareFileLister,
  • LogFile,
  • LogRecord$Status,
  • LogRecord$Type,
  • LogRecord,
  • LogReplica,
  • LogReplicaSet,
  • LogTransaction$CorruptTransactionLogException,
  • LogTransaction$SSTableTidier,
  • LogTransaction$TransactionTidier,
  • LogTransaction,
  • SSTableIntervalTree,
  • View,
  • LogTransaction$LogFilesByName
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now