IDiskAtomFilter filter = ThriftValidation.asIFilter(predicate, cfm, null); RangeSliceCommand cmd = new RangeSliceCommand(keyspace, columnFamily, nowMillis, filter, new Bounds<RowPosition>(startPosition, endPosition), pageSize);
private static Set<SSTableReader> overlappingWithBounds(Token start, Token end, Map<SSTableReader, Bounds<Token>> sstables) { assert start.compareTo(end) <= 0; Set<SSTableReader> overlapped = new HashSet<>(); Bounds<Token> promotedBounds = new Bounds<Token>(start, end); for (Map.Entry<SSTableReader, Bounds<Token>> pair : sstables.entrySet()) { if (pair.getValue().intersects(promotedBounds)) overlapped.add(pair.getKey()); } return overlapped; }
private static Set<SSTableReader> overlappingWithBounds(Token start, Token end, Map<SSTableReader, Bounds<Token>> sstables) { assert start.compareTo(end) <= 0; Set<SSTableReader> overlapped = new HashSet<>(); Bounds<Token> promotedBounds = new Bounds<Token>(start, end); for (Map.Entry<SSTableReader, Bounds<Token>> pair : sstables.entrySet()) { if (pair.getValue().intersects(promotedBounds)) overlapped.add(pair.getKey()); } return overlapped; }
private static Map<SSTableReader, Bounds<Token>> genBounds(Iterable<SSTableReader> ssTableReaders) { Map<SSTableReader, Bounds<Token>> boundsMap = new HashMap<>(); for (SSTableReader sstable : ssTableReaders) { boundsMap.put(sstable, new Bounds<Token>(sstable.first.getToken(), sstable.last.getToken())); } return boundsMap; }
private static Map<SSTableReader, Bounds<Token>> genBounds(Iterable<SSTableReader> ssTableReaders) { Map<SSTableReader, Bounds<Token>> boundsMap = new HashMap<>(); for (SSTableReader sstable : ssTableReaders) { boundsMap.put(sstable, new Bounds<Token>(sstable.first.getToken(), sstable.last.getToken())); } return boundsMap; }
/** * 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 Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); // Check if the split would have no effect on the range if (position.equals(right)) return null; AbstractBounds<T> lb = new Bounds<T>(left, position); AbstractBounds<T> rb = new Range<T>(position, right); return Pair.create(lb, rb); }
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); // Check if the split would have no effect on the range if (position.equals(right)) return null; AbstractBounds<T> lb = new Bounds<T>(left, position); AbstractBounds<T> rb = new Range<T>(position, right); return Pair.create(lb, rb); }
public boolean apply(SSTableReader sstable) { return sstable != null && !(sstable.partitioner instanceof LocalPartitioner) && // exclude SSTables from 2i new Bounds<>(sstable.first.getToken(), sstable.last.getToken()).intersects(Collections.singleton(repairingRange)); } }, true); //ephemeral snapshot, if repair fails, it will be cleaned next startup
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); // Check if the split would have no effect on the range if (position.equals(right)) return null; AbstractBounds<T> lb = new Bounds<T>(left, position); AbstractBounds<T> rb = new Range<T>(position, right); return Pair.create(lb, rb); }
public static <T extends RingPosition<T>> AbstractBounds<T> bounds(T min, boolean inclusiveMin, T max, boolean inclusiveMax) { if (inclusiveMin && inclusiveMax) return new Bounds<T>(min, max); else if (inclusiveMax) return new Range<T>(min, max); else if (inclusiveMin) return new IncludingExcludingBounds<T>(min, max); else return new ExcludingBounds<T>(min, max); }
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); AbstractBounds<T> lb = new Bounds<T>(left, position); AbstractBounds<T> rb = new ExcludingBounds<T>(position, right); return Pair.create(lb, rb); }
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); AbstractBounds<T> lb = new Bounds<T>(left, position); AbstractBounds<T> rb = new ExcludingBounds<T>(position, right); return Pair.create(lb, rb); }
public static <T extends RingPosition<T>> AbstractBounds<T> bounds(T min, boolean inclusiveMin, T max, boolean inclusiveMax) { if (inclusiveMin && inclusiveMax) return new Bounds<T>(min, max); else if (inclusiveMax) return new Range<T>(min, max); else if (inclusiveMin) return new IncludingExcludingBounds<T>(min, max); else return new ExcludingBounds<T>(min, max); }
public Pair<AbstractBounds<T>, AbstractBounds<T>> split(T position) { assert contains(position); AbstractBounds<T> lb = new Bounds<T>(left, position, partitioner); AbstractBounds<T> rb = new ExcludingBounds<T>(position, right, partitioner); return Pair.create(lb, rb); }
public boolean apply(SSTableReader sstable) { return sstable != null && !sstable.metadata.isIndex() && // exclude SSTables from 2i new Bounds<>(sstable.first.getToken(), sstable.last.getToken()).intersects(desc.ranges); } }, true, false); //ephemeral snapshot, if repair fails, it will be cleaned next startup
public boolean apply(SSTableReader sstable) { return sstable != null && !sstable.metadata.isIndex() && // exclude SSTables from 2i new Bounds<>(sstable.first.getToken(), sstable.last.getToken()).intersects(desc.ranges); } }, true, false); //ephemeral snapshot, if repair fails, it will be cleaned next startup
public boolean apply(SSTableReader sstable) { return sstable != null && (!isIncremental || !sstable.isRepaired()) && !(sstable.metadata.isIndex()) && // exclude SSTables from 2i new Bounds<>(sstable.first.getToken(), sstable.last.getToken()).intersects(ranges); } }, true, false);
public boolean apply(SSTableReader sstable) { return sstable != null && (!isIncremental || !sstable.isRepaired()) && !(sstable.metadata.isIndex()) && // exclude SSTables from 2i new Bounds<>(sstable.first.getToken(), sstable.last.getToken()).intersects(ranges); } }, true, false);