Tabnine Logo
Memtable.getCommitLogLowerBound
Code IndexAdd Tabnine to your IDE (free)

How to use
getCommitLogLowerBound
method
in
org.apache.cassandra.db.Memtable

Best Java code snippets using org.apache.cassandra.db.Memtable.getCommitLogLowerBound (Showing top 6 results out of 315)

origin: org.apache.cassandra/cassandra-all

  public CommitLogPosition call()
  {
    try
    {
      // we wait on the latch for the commitLogUpperBound to be set, and so that waiters
      // on this task can rely on all prior flushes being complete
      latch.await();
    }
    catch (InterruptedException e)
    {
      throw new IllegalStateException();
    }
    CommitLogPosition commitLogUpperBound = CommitLogPosition.NONE;
    // If a flush errored out but the error was ignored, make sure we don't discard the commit log.
    if (flushFailure == null && !memtables.isEmpty())
    {
      Memtable memtable = memtables.get(0);
      commitLogUpperBound = memtable.getCommitLogUpperBound();
      CommitLog.instance.discardCompletedSegments(metadata.cfId, memtable.getCommitLogLowerBound(), commitLogUpperBound);
    }
    metric.pendingFlushes.dec();
    if (flushFailure != null)
      throw Throwables.propagate(flushFailure);
    return commitLogUpperBound;
  }
}
origin: org.apache.cassandra/cassandra-all

/**
 * @return a Future yielding the commit log position that can be guaranteed to have been successfully written
 *         to sstables for this table once the future completes
 */
private ListenableFuture<CommitLogPosition> waitForFlushes()
{
  // we grab the current memtable; once any preceding memtables have flushed, we know its
  // commitLogLowerBound has been set (as this it is set with the upper bound of the preceding memtable)
  final Memtable current = data.getView().getCurrentMemtable();
  ListenableFutureTask<CommitLogPosition> task = ListenableFutureTask.create(() -> {
    logger.debug("forceFlush requested but everything is clean in {}", name);
    return current.getCommitLogLowerBound();
  });
  postFlushExecutor.execute(task);
  return task;
}
origin: jsevellec/cassandra-unit

/**
 * @return a Future yielding the commit log position that can be guaranteed to have been successfully written
 *         to sstables for this table once the future completes
 */
private ListenableFuture<CommitLogPosition> waitForFlushes()
{
  // we grab the current memtable; once any preceding memtables have flushed, we know its
  // commitLogLowerBound has been set (as this it is set with the upper bound of the preceding memtable)
  final Memtable current = data.getView().getCurrentMemtable();
  ListenableFutureTask<CommitLogPosition> task = ListenableFutureTask.create(() -> {
    logger.debug("forceFlush requested but everything is clean in {}", name);
    return current.getCommitLogLowerBound();
  });
  postFlushExecutor.execute(task);
  return task;
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * @return a Future yielding the commit log position that can be guaranteed to have been successfully written
 *         to sstables for this table once the future completes
 */
private ListenableFuture<CommitLogPosition> waitForFlushes()
{
  // we grab the current memtable; once any preceding memtables have flushed, we know its
  // commitLogLowerBound has been set (as this it is set with the upper bound of the preceding memtable)
  final Memtable current = data.getView().getCurrentMemtable();
  ListenableFutureTask<CommitLogPosition> task = ListenableFutureTask.create(() -> {
    logger.debug("forceFlush requested but everything is clean in {}", name);
    return current.getCommitLogLowerBound();
  });
  postFlushExecutor.execute(task);
  return task;
}
origin: com.strapdata.cassandra/cassandra-all

  public CommitLogPosition call()
  {
    try
    {
      // we wait on the latch for the commitLogUpperBound to be set, and so that waiters
      // on this task can rely on all prior flushes being complete
      latch.await();
    }
    catch (InterruptedException e)
    {
      throw new IllegalStateException();
    }
    CommitLogPosition commitLogUpperBound = CommitLogPosition.NONE;
    // If a flush errored out but the error was ignored, make sure we don't discard the commit log.
    if (flushFailure == null && !memtables.isEmpty())
    {
      Memtable memtable = memtables.get(0);
      commitLogUpperBound = memtable.getCommitLogUpperBound();
      CommitLog.instance.discardCompletedSegments(metadata.cfId, memtable.getCommitLogLowerBound(), commitLogUpperBound);
    }
    metric.pendingFlushes.dec();
    if (flushFailure != null)
      throw Throwables.propagate(flushFailure);
    return commitLogUpperBound;
  }
}
origin: jsevellec/cassandra-unit

  public CommitLogPosition call()
  {
    try
    {
      // we wait on the latch for the commitLogUpperBound to be set, and so that waiters
      // on this task can rely on all prior flushes being complete
      latch.await();
    }
    catch (InterruptedException e)
    {
      throw new IllegalStateException();
    }
    CommitLogPosition commitLogUpperBound = CommitLogPosition.NONE;
    // If a flush errored out but the error was ignored, make sure we don't discard the commit log.
    if (flushFailure == null && !memtables.isEmpty())
    {
      Memtable memtable = memtables.get(0);
      commitLogUpperBound = memtable.getCommitLogUpperBound();
      CommitLog.instance.discardCompletedSegments(metadata.cfId, memtable.getCommitLogLowerBound(), commitLogUpperBound);
    }
    metric.pendingFlushes.dec();
    if (flushFailure != null)
      throw Throwables.propagate(flushFailure);
    return commitLogUpperBound;
  }
}
org.apache.cassandra.dbMemtablegetCommitLogLowerBound

Popular methods of Memtable

  • getOperations
  • <init>
  • accepts
  • getAllocator
  • getLiveDataSize
  • isClean
  • isExpired
  • partitionCount
  • put
    Should only be called by ColumnFamilyStore.apply via Keyspace.apply, which supplies the appropriate
  • setDiscarded
  • setDiscarding
  • toString
  • setDiscarding,
  • toString,
  • abortRunnables,
  • createFlushRunnables,
  • findMinLocalDeletionTime,
  • flushRunnables,
  • getCommitLogUpperBound,
  • getMinTimestamp,
  • getPartition

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JCheckBox (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Sublime Text plugins
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