protected boolean isPreviouslyReturnedPartition(DecoratedKey key) { // Note that lastReturnedKey can be null, but key cannot. return key.equals(lastReturnedKey); }
protected boolean isPreviouslyReturnedPartition(DecoratedKey key) { // Note that lastReturnedKey can be null, but key cannot. return key.equals(lastReturnedKey); }
@Override public Row applyToRow(Row row) { if (!currentKey.equals(lastKey)) { remainingInPartition = limits.perPartitionCount(); lastKey = currentKey; } lastRow = row; return row; } }
@Override public Row applyToRow(Row row) { if (!currentKey.equals(lastKey)) { remainingInPartition = limits.perPartitionCount(); lastKey = currentKey; } lastRow = row; return row; } }
@Override public ClusteringIndexFilter clusteringIndexFilter(DecoratedKey key) { return key.equals(startKey()) ? clusteringIndexFilter.forPaging(comparator, lastReturned, inclusive) : clusteringIndexFilter; }
@Override public ClusteringIndexFilter clusteringIndexFilter(DecoratedKey key) { return key.equals(startKey()) ? clusteringIndexFilter.forPaging(comparator, lastReturned, inclusive) : clusteringIndexFilter; }
@Override public ClusteringIndexFilter clusteringIndexFilter(DecoratedKey key) { return key.equals(startKey()) ? clusteringIndexFilter.forPaging(comparator, lastReturned, inclusive) : clusteringIndexFilter; }
@Override public ClusteringIndexFilter clusteringIndexFilter(DecoratedKey key) { return key.equals(startKey()) ? clusteringIndexFilter.forPaging(comparator, lastReturned, inclusive) : clusteringIndexFilter; }
@SuppressWarnings("resource") // We're not really creating any resource here private static void checkForInvalidInput(List<UnfilteredRowIterator> iterators) { if (iterators.isEmpty()) return; UnfilteredRowIterator first = iterators.get(0); for (int i = 1; i < iterators.size(); i++) { UnfilteredRowIterator iter = iterators.get(i); assert first.metadata().cfId.equals(iter.metadata().cfId); assert first.partitionKey().equals(iter.partitionKey()); assert first.isReverseOrder() == iter.isReverseOrder(); } }
@SuppressWarnings("resource") // We're not really creating any resource here private static void checkForInvalidInput(List<UnfilteredRowIterator> iterators) { if (iterators.isEmpty()) return; UnfilteredRowIterator first = iterators.get(0); for (int i = 1; i < iterators.size(); i++) { UnfilteredRowIterator iter = iterators.get(i); assert first.metadata().cfId.equals(iter.metadata().cfId); assert first.partitionKey().equals(iter.partitionKey()); assert first.isReverseOrder() == iter.isReverseOrder(); } }
private void validateSamePartition(UUID cfId, DecoratedKey key, PartitionUpdate update) throws InvalidRequestException { if (!key.equals(update.partitionKey())) throw new InvalidRequestException("Partition key of additional mutation does not match primary update key"); if (!cfId.equals(update.metadata().cfId)) throw new InvalidRequestException("table of additional mutation does not match primary update table"); }
private void validateSamePartition(UUID cfId, DecoratedKey key, PartitionUpdate update) throws InvalidRequestException { if (!key.equals(update.partitionKey())) throw new InvalidRequestException("Partition key of additional mutation does not match primary update key"); if (!cfId.equals(update.metadata().cfId)) throw new InvalidRequestException("table of additional mutation does not match primary update table"); }
public PaxosState(Commit promised, Commit accepted, Commit mostRecentCommit) { assert promised.update.partitionKey().equals(accepted.update.partitionKey()) && accepted.update.partitionKey().equals(mostRecentCommit.update.partitionKey()); assert promised.update.metadata() == accepted.update.metadata() && accepted.update.metadata() == mostRecentCommit.update.metadata(); this.promised = promised; this.accepted = accepted; this.mostRecentCommit = mostRecentCommit; }
public PrepareResponse(boolean promised, Commit inProgressCommit, Commit mostRecentCommit) { assert inProgressCommit.update.partitionKey().equals(mostRecentCommit.update.partitionKey()); assert inProgressCommit.update.metadata() == mostRecentCommit.update.metadata(); this.promised = promised; this.mostRecentCommit = mostRecentCommit; this.inProgressCommit = inProgressCommit; }
public PaxosState(Commit promised, Commit accepted, Commit mostRecentCommit) { assert promised.update.partitionKey().equals(accepted.update.partitionKey()) && accepted.update.partitionKey().equals(mostRecentCommit.update.partitionKey()); assert promised.update.metadata() == accepted.update.metadata() && accepted.update.metadata() == mostRecentCommit.update.metadata(); this.promised = promised; this.accepted = accepted; this.mostRecentCommit = mostRecentCommit; }
public PaxosState(Commit promised, Commit accepted, Commit mostRecentCommit) { assert promised.update.partitionKey().equals(accepted.update.partitionKey()) && accepted.update.partitionKey().equals(mostRecentCommit.update.partitionKey()); assert promised.update.metadata() == accepted.update.metadata() && accepted.update.metadata() == mostRecentCommit.update.metadata(); this.promised = promised; this.accepted = accepted; this.mostRecentCommit = mostRecentCommit; }
public PrepareResponse(boolean promised, Commit inProgressCommit, Commit mostRecentCommit) { assert inProgressCommit.update.partitionKey().equals(mostRecentCommit.update.partitionKey()); assert inProgressCommit.update.metadata() == mostRecentCommit.update.metadata(); this.promised = promised; this.mostRecentCommit = mostRecentCommit; this.inProgressCommit = inProgressCommit; }
public boolean selectsKey(DecoratedKey key) { if (!this.partitionKey().equals(key)) return false; return rowFilter().partitionKeyRestrictionsAreSatisfiedBy(key, metadata().getKeyValidator()); }
public boolean selectsKey(DecoratedKey key) { if (!this.partitionKey().equals(key)) return false; return rowFilter().partitionKeyRestrictionsAreSatisfiedBy(key, metadata().getKeyValidator()); }
public boolean selectsKey(DecoratedKey key) { if (!this.partitionKey().equals(key)) return false; return rowFilter().partitionKeyRestrictionsAreSatisfiedBy(key, metadata().getKeyValidator()); }