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

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

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

origin: jsevellec/cassandra-unit

public MemtableUnfilteredPartitionIterator makePartitionIterator(final ColumnFilter columnFilter, final DataRange dataRange, final boolean isForThrift)
{
  AbstractBounds<PartitionPosition> keyRange = dataRange.keyRange();
  boolean startIsMin = keyRange.left.isMinimum();
  boolean stopIsMin = keyRange.right.isMinimum();
  boolean isBound = keyRange instanceof Bounds;
  boolean includeStart = isBound || keyRange instanceof IncludingExcludingBounds;
  boolean includeStop = isBound || keyRange instanceof Range;
  Map<PartitionPosition, AtomicBTreePartition> subMap;
  if (startIsMin)
    subMap = stopIsMin ? partitions : partitions.headMap(keyRange.right, includeStop);
  else
    subMap = stopIsMin
        ? partitions.tailMap(keyRange.left, includeStart)
        : partitions.subMap(keyRange.left, includeStart, keyRange.right, includeStop);
  int minLocalDeletionTime = Integer.MAX_VALUE;
  // avoid iterating over the memtable if we purge all tombstones
  if (cfs.getCompactionStrategyManager().onlyPurgeRepairedTombstones())
    minLocalDeletionTime = findMinLocalDeletionTime(subMap.entrySet().iterator());
  final Iterator<Map.Entry<PartitionPosition, AtomicBTreePartition>> iter = subMap.entrySet().iterator();
  return new MemtableUnfilteredPartitionIterator(cfs, iter, isForThrift, minLocalDeletionTime, columnFilter, dataRange);
}
origin: com.strapdata.cassandra/cassandra-all

public MemtableUnfilteredPartitionIterator makePartitionIterator(final ColumnFilter columnFilter, final DataRange dataRange, final boolean isForThrift)
{
  AbstractBounds<PartitionPosition> keyRange = dataRange.keyRange();
  boolean startIsMin = keyRange.left.isMinimum();
  boolean stopIsMin = keyRange.right.isMinimum();
  boolean isBound = keyRange instanceof Bounds;
  boolean includeStart = isBound || keyRange instanceof IncludingExcludingBounds;
  boolean includeStop = isBound || keyRange instanceof Range;
  Map<PartitionPosition, AtomicBTreePartition> subMap;
  if (startIsMin)
    subMap = stopIsMin ? partitions : partitions.headMap(keyRange.right, includeStop);
  else
    subMap = stopIsMin
        ? partitions.tailMap(keyRange.left, includeStart)
        : partitions.subMap(keyRange.left, includeStart, keyRange.right, includeStop);
  int minLocalDeletionTime = Integer.MAX_VALUE;
  // avoid iterating over the memtable if we purge all tombstones
  if (cfs.getCompactionStrategyManager().onlyPurgeRepairedTombstones())
    minLocalDeletionTime = findMinLocalDeletionTime(subMap.entrySet().iterator());
  final Iterator<Map.Entry<PartitionPosition, AtomicBTreePartition>> iter = subMap.entrySet().iterator();
  return new MemtableUnfilteredPartitionIterator(cfs, iter, isForThrift, minLocalDeletionTime, columnFilter, dataRange);
}
origin: org.apache.cassandra/cassandra-all

public MemtableUnfilteredPartitionIterator makePartitionIterator(final ColumnFilter columnFilter, final DataRange dataRange, final boolean isForThrift)
{
  AbstractBounds<PartitionPosition> keyRange = dataRange.keyRange();
  boolean startIsMin = keyRange.left.isMinimum();
  boolean stopIsMin = keyRange.right.isMinimum();
  boolean isBound = keyRange instanceof Bounds;
  boolean includeStart = isBound || keyRange instanceof IncludingExcludingBounds;
  boolean includeStop = isBound || keyRange instanceof Range;
  Map<PartitionPosition, AtomicBTreePartition> subMap;
  if (startIsMin)
    subMap = stopIsMin ? partitions : partitions.headMap(keyRange.right, includeStop);
  else
    subMap = stopIsMin
        ? partitions.tailMap(keyRange.left, includeStart)
        : partitions.subMap(keyRange.left, includeStart, keyRange.right, includeStop);
  int minLocalDeletionTime = Integer.MAX_VALUE;
  // avoid iterating over the memtable if we purge all tombstones
  if (cfs.getCompactionStrategyManager().onlyPurgeRepairedTombstones())
    minLocalDeletionTime = findMinLocalDeletionTime(subMap.entrySet().iterator());
  final Iterator<Map.Entry<PartitionPosition, AtomicBTreePartition>> iter = subMap.entrySet().iterator();
  return new MemtableUnfilteredPartitionIterator(cfs, iter, isForThrift, minLocalDeletionTime, columnFilter, dataRange);
}
org.apache.cassandra.dbMemtablefindMinLocalDeletionTime

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,
  • flushRunnables,
  • getCommitLogLowerBound,
  • getCommitLogUpperBound,
  • getMinTimestamp,
  • getPartition

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JFrame (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
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