Tabnine Logo
PartitionPosition.isMinimum
Code IndexAdd Tabnine to your IDE (free)

How to use
isMinimum
method
in
org.apache.cassandra.db.PartitionPosition

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

origin: jsevellec/cassandra-unit

private Paging(AbstractBounds<PartitionPosition> range,
        ClusteringIndexFilter filter,
        ClusteringComparator comparator,
        Clustering lastReturned,
        boolean inclusive)
{
  super(range, filter);
  // When using a paging range, we don't allow wrapped ranges, as it's unclear how to handle them properly.
  // This is ok for now since we only need this in range queries, and the range are "unwrapped" in that case.
  assert !(range instanceof Range) || !((Range<?>)range).isWrapAround() || range.right.isMinimum() : range;
  assert lastReturned != null;
  this.comparator = comparator;
  this.lastReturned = lastReturned;
  this.inclusive = inclusive;
}
origin: org.apache.cassandra/cassandra-all

private Paging(AbstractBounds<PartitionPosition> range,
        ClusteringIndexFilter filter,
        ClusteringComparator comparator,
        Clustering lastReturned,
        boolean inclusive)
{
  super(range, filter);
  // When using a paging range, we don't allow wrapped ranges, as it's unclear how to handle them properly.
  // This is ok for now since we only need this in range queries, and the range are "unwrapped" in that case.
  assert !(range instanceof Range) || !((Range<?>)range).isWrapAround() || range.right.isMinimum() : range;
  assert lastReturned != null;
  this.comparator = comparator;
  this.lastReturned = lastReturned;
  this.inclusive = inclusive;
}
origin: com.strapdata.cassandra/cassandra-all

private Paging(AbstractBounds<PartitionPosition> range,
        ClusteringIndexFilter filter,
        ClusteringComparator comparator,
        Clustering lastReturned,
        boolean inclusive)
{
  super(range, filter);
  // When using a paging range, we don't allow wrapped ranges, as it's unclear how to handle them properly.
  // This is ok for now since we only need this in range queries, and the range are "unwrapped" in that case.
  assert !(range instanceof Range) || !((Range<?>)range).isWrapAround() || range.right.isMinimum() : range;
  assert lastReturned != null;
  this.comparator = comparator;
  this.lastReturned = lastReturned;
  this.inclusive = inclusive;
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

private Paging(AbstractBounds<PartitionPosition> range,
        ClusteringIndexFilter filter,
        ClusteringComparator comparator,
        Clustering lastReturned,
        boolean inclusive)
{
  super(range, filter);
  // When using a paging range, we don't allow wrapped ranges, as it's unclear how to handle them properly.
  // This is ok for now since we only need this in range queries, and the range are "unwrapped" in that case.
  assert !(range instanceof Range) || !((Range<?>)range).isWrapAround() || range.right.isMinimum() : range;
  assert lastReturned != null;
  this.comparator = comparator;
  this.lastReturned = lastReturned;
  this.inclusive = inclusive;
}
origin: org.apache.cassandra/cassandra-all

/**
 * Whether this {@code DataRange} queries everything (has no restriction neither on the
 * partition queried, nor within the queried partition).
 *
 * @return Whether this {@code DataRange} queries everything.
 */
public boolean isUnrestricted()
{
  return startKey().isMinimum() && stopKey().isMinimum() && clusteringIndexFilter.selectsAllPartition();
}
origin: jsevellec/cassandra-unit

/**
 * Whether this {@code DataRange} queries everything (has no restriction neither on the
 * partition queried, nor within the queried partition).
 *
 * @return Whether this {@code DataRange} queries everything.
 */
public boolean isUnrestricted()
{
  return startKey().isMinimum() && stopKey().isMinimum() && clusteringIndexFilter.selectsAllPartition();
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

/**
 * Whether this {@code DataRange} queries everything (has no restriction neither on the
 * partition queried, nor within the queried partition).
 *
 * @return Whether this {@code DataRange} queries everything.
 */
public boolean isUnrestricted()
{
  return startKey().isMinimum() && stopKey().isMinimum() && clusteringIndexFilter.selectsAllPartition();
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * Whether this {@code DataRange} queries everything (has no restriction neither on the
 * partition queried, nor within the queried partition).
 *
 * @return Whether this {@code DataRange} queries everything.
 */
public boolean isUnrestricted()
{
  return startKey().isMinimum() && stopKey().isMinimum() && clusteringIndexFilter.selectsAllPartition();
}
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);
}
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: jsevellec/cassandra-unit

public String toCQLString(CFMetaData metadata)
{
  if (isUnrestricted())
    return "UNRESTRICTED";
  StringBuilder sb = new StringBuilder();
  boolean needAnd = false;
  if (!startKey().isMinimum())
  {
    appendClause(startKey(), sb, metadata, true, keyRange.isStartInclusive());
    needAnd = true;
  }
  if (!stopKey().isMinimum())
  {
    if (needAnd)
      sb.append(" AND ");
    appendClause(stopKey(), sb, metadata, false, keyRange.isEndInclusive());
    needAnd = true;
  }
  String filterString = clusteringIndexFilter.toCQLString(metadata);
  if (!filterString.isEmpty())
    sb.append(needAnd ? " AND " : "").append(filterString);
  return sb.toString();
}
origin: jsevellec/cassandra-unit

/**
 * Returns the sstables that have any partition between {@code left} and {@code right}, when both bounds are taken inclusively.
 * The interval formed by {@code left} and {@code right} shouldn't wrap.
 */
public Iterable<SSTableReader> liveSSTablesInBounds(PartitionPosition left, PartitionPosition right)
{
  assert !AbstractBounds.strictlyWrapsAround(left, right);
  if (intervalTree.isEmpty())
    return Collections.emptyList();
  PartitionPosition stopInTree = right.isMinimum() ? intervalTree.max() : right;
  return intervalTree.search(Interval.create(left, stopInTree));
}
origin: org.apache.cassandra/cassandra-all

/**
 * Returns the sstables that have any partition between {@code left} and {@code right}, when both bounds are taken inclusively.
 * The interval formed by {@code left} and {@code right} shouldn't wrap.
 */
public Iterable<SSTableReader> liveSSTablesInBounds(PartitionPosition left, PartitionPosition right)
{
  assert !AbstractBounds.strictlyWrapsAround(left, right);
  if (intervalTree.isEmpty())
    return Collections.emptyList();
  PartitionPosition stopInTree = right.isMinimum() ? intervalTree.max() : right;
  return intervalTree.search(Interval.create(left, stopInTree));
}
origin: org.apache.cassandra/cassandra-all

public static List<SSTableReader> sstablesInBounds(PartitionPosition left, PartitionPosition right, SSTableIntervalTree intervalTree)
{
  assert !AbstractBounds.strictlyWrapsAround(left, right);
  if (intervalTree.isEmpty())
    return Collections.emptyList();
  PartitionPosition stopInTree = right.isMinimum() ? intervalTree.max() : right;
  return intervalTree.search(Interval.create(left, stopInTree));
}
origin: jsevellec/cassandra-unit

public static List<SSTableReader> sstablesInBounds(PartitionPosition left, PartitionPosition right, SSTableIntervalTree intervalTree)
{
  assert !AbstractBounds.strictlyWrapsAround(left, right);
  if (intervalTree.isEmpty())
    return Collections.emptyList();
  PartitionPosition stopInTree = right.isMinimum() ? intervalTree.max() : right;
  return intervalTree.search(Interval.create(left, stopInTree));
}
origin: com.strapdata.cassandra/cassandra-all

/**
 * Returns the sstables that have any partition between {@code left} and {@code right}, when both bounds are taken inclusively.
 * The interval formed by {@code left} and {@code right} shouldn't wrap.
 */
public Iterable<SSTableReader> liveSSTablesInBounds(PartitionPosition left, PartitionPosition right)
{
  assert !AbstractBounds.strictlyWrapsAround(left, right);
  if (intervalTree.isEmpty())
    return Collections.emptyList();
  PartitionPosition stopInTree = right.isMinimum() ? intervalTree.max() : right;
  return intervalTree.search(Interval.create(left, stopInTree));
}
origin: com.strapdata.cassandra/cassandra-all

public static List<SSTableReader> sstablesInBounds(PartitionPosition left, PartitionPosition right, SSTableIntervalTree intervalTree)
{
  assert !AbstractBounds.strictlyWrapsAround(left, right);
  if (intervalTree.isEmpty())
    return Collections.emptyList();
  PartitionPosition stopInTree = right.isMinimum() ? intervalTree.max() : right;
  return intervalTree.search(Interval.create(left, stopInTree));
}
origin: org.apache.cassandra/cassandra-all

  private Set<SSTableIndex> applyScope(Set<SSTableIndex> indexes)
  {
    return Sets.filter(indexes, index -> {
      SSTableReader sstable = index.getSSTable();
      return range.startKey().compareTo(sstable.last) <= 0 && (range.stopKey().isMinimum() || sstable.first.compareTo(range.stopKey()) <= 0);
    });
  }
}
origin: jsevellec/cassandra-unit

  private Set<SSTableIndex> applyScope(Set<SSTableIndex> indexes)
  {
    return Sets.filter(indexes, index -> {
      SSTableReader sstable = index.getSSTable();
      return range.startKey().compareTo(sstable.last) <= 0 && (range.stopKey().isMinimum() || sstable.first.compareTo(range.stopKey()) <= 0);
    });
  }
}
origin: com.strapdata.cassandra/cassandra-all

  private Set<SSTableIndex> applyScope(Set<SSTableIndex> indexes)
  {
    return Sets.filter(indexes, index -> {
      SSTableReader sstable = index.getSSTable();
      return range.startKey().compareTo(sstable.last) <= 0 && (range.stopKey().isMinimum() || sstable.first.compareTo(range.stopKey()) <= 0);
    });
  }
}
org.apache.cassandra.dbPartitionPositionisMinimum

Popular methods of PartitionPosition

  • compareTo
  • getToken
  • kind

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Notification (javax.management)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top PhpStorm 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