RowPosition startPosition = start.minKeyBound(partitioner); RowPosition endPosition = end.minKeyBound(partitioner);
@SuppressWarnings("unchecked") public <R extends RingPosition<R>> R minValue(Class<R> klass) { Token minToken = getMinimumToken(); if (minToken.getClass().equals(klass)) return (R)minToken; else return (R)minToken.minKeyBound(); } }
public static PartitionPosition get(ByteBuffer key, IPartitioner p) { return key == null || key.remaining() == 0 ? p.getMinimumToken().minKeyBound() : p.decorateKey(key); } }
public static PartitionPosition get(ByteBuffer key, IPartitioner p) { return key == null || key.remaining() == 0 ? p.getMinimumToken().minKeyBound() : p.decorateKey(key); } }
public static RowPosition get(ByteBuffer key, IPartitioner p) { return key == null || key.remaining() == 0 ? p.getMinimumToken().minKeyBound() : p.decorateKey(key); } }
public static PartitionPosition get(ByteBuffer key, IPartitioner p) { return key == null || key.remaining() == 0 ? p.getMinimumToken().minKeyBound() : p.decorateKey(key); } }
/** * Compute a bounds of keys corresponding to a given bounds of token. */ public static Bounds<PartitionPosition> makeRowBounds(Token left, Token right) { return new Bounds<PartitionPosition>(left.minKeyBound(), right.maxKeyBound()); }
/** * Compute a bounds of keys corresponding to a given bounds of token. */ public static Bounds<PartitionPosition> makeRowBounds(Token left, Token right) { return new Bounds<PartitionPosition>(left.minKeyBound(), right.maxKeyBound()); }
public KeyBound maxKeyBound() { /* * For each token, we needs both minKeyBound and maxKeyBound * because a token corresponds to a range of keys. But the minimun * token corresponds to no key, so it is valid and actually much * simpler to associate the same value for minKeyBound and * maxKeyBound for the minimun token. */ if (isMinimum()) return minKeyBound(); return new KeyBound(this, false); }
/** * Compute a bounds of keys corresponding to a given bounds of token. */ public static Bounds<RowPosition> makeRowBounds(Token left, Token right, IPartitioner partitioner) { return new Bounds<RowPosition>(left.minKeyBound(partitioner), right.maxKeyBound(partitioner), partitioner); }
/** * Compute a bounds of keys corresponding to a given bounds of token. */ public static Bounds<PartitionPosition> makeRowBounds(Token left, Token right) { return new Bounds<PartitionPosition>(left.minKeyBound(), right.maxKeyBound()); }
public KeyBound maxKeyBound() { /* * For each token, we needs both minKeyBound and maxKeyBound * because a token corresponds to a range of keys. But the minimun * token corresponds to no key, so it is valid and actually much * simpler to associate the same value for minKeyBound and * maxKeyBound for the minimun token. */ if (isMinimum()) return minKeyBound(); return new KeyBound(this, false); }
public KeyBound minValue() { return getPartitioner().getMinimumToken().minKeyBound(); }
public KeyBound minValue() { return getPartitioner().getMinimumToken().minKeyBound(); }
public KeyBound minValue() { return getPartitioner().getMinimumToken().minKeyBound(); }
/** * Compute a bounds of keys corresponding to a given bounds of token. */ public static Bounds<PartitionPosition> makeRowBounds(Token left, Token right) { return new Bounds<PartitionPosition>(left.minKeyBound(), right.maxKeyBound()); }
/** * Compute a bounds of keys corresponding to a given bounds of token. */ private static IncludingExcludingBounds<RowPosition> makeRowBounds(Token left, Token right, IPartitioner partitioner) { return new IncludingExcludingBounds<RowPosition>(left.maxKeyBound(partitioner), right.minKeyBound(partitioner), partitioner); }
private static Collection<SSTableReader> sstablesInBounds(ColumnFamilyStore cfs, Collection<Range<Token>> tokenRangeCollection) { final Set<SSTableReader> sstables = new HashSet<>(); Iterable<SSTableReader> liveTables = cfs.getTracker().getView().select(SSTableSet.LIVE); SSTableIntervalTree tree = SSTableIntervalTree.build(liveTables); for (Range<Token> tokenRange : tokenRangeCollection) { Iterable<SSTableReader> ssTableReaders = View.sstablesInBounds(tokenRange.left.minKeyBound(), tokenRange.right.maxKeyBound(), tree); Iterables.addAll(sstables, ssTableReaders); } return sstables; }
private static Collection<SSTableReader> sstablesInBounds(ColumnFamilyStore cfs, Collection<Range<Token>> tokenRangeCollection) { final Set<SSTableReader> sstables = new HashSet<>(); Iterable<SSTableReader> liveTables = cfs.getTracker().getView().select(SSTableSet.LIVE); SSTableIntervalTree tree = SSTableIntervalTree.build(liveTables); for (Range<Token> tokenRange : tokenRangeCollection) { Iterable<SSTableReader> ssTableReaders = View.sstablesInBounds(tokenRange.left.minKeyBound(), tokenRange.right.maxKeyBound(), tree); Iterables.addAll(sstables, ssTableReaders); } return sstables; }
private static Collection<SSTableReader> sstablesInBounds(ColumnFamilyStore cfs, Collection<Range<Token>> tokenRangeCollection) { final Set<SSTableReader> sstables = new HashSet<>(); Iterable<SSTableReader> liveTables = cfs.getTracker().getView().select(SSTableSet.LIVE); SSTableIntervalTree tree = SSTableIntervalTree.build(liveTables); for (Range<Token> tokenRange : tokenRangeCollection) { Iterable<SSTableReader> ssTableReaders = View.sstablesInBounds(tokenRange.left.minKeyBound(), tokenRange.right.maxKeyBound(), tree); Iterables.addAll(sstables, ssTableReaders); } return sstables; }