/** * Digests the the provided iterator. * * @param command the command that has yield {@code iterator}. This can be null if {@code version >= MessagingService.VERSION_30} * as this is only used when producing digest to be sent to legacy nodes. * @param iterator the iterator to digest. * @param digest the {@code MessageDigest} to use for the digest. * @param version the messaging protocol to use when producing the digest. */ public static void digest(ReadCommand command, UnfilteredPartitionIterator iterator, MessageDigest digest, int version) { try (UnfilteredPartitionIterator iter = iterator) { while (iter.hasNext()) { try (UnfilteredRowIterator partition = iter.next()) { UnfilteredRowIterators.digest(command, partition, digest, version); } } } }
public void serialize(UnfilteredPartitionIterator iter, ColumnFilter selection, DataOutputPlus out, int version) throws IOException { assert version >= MessagingService.VERSION_30; // We handle backward compatibility directy in ReadResponse.LegacyRangeSliceReplySerializer out.writeBoolean(iter.isForThrift()); while (iter.hasNext()) { out.writeBoolean(true); try (UnfilteredRowIterator partition = iter.next()) { UnfilteredRowIteratorSerializer.serializer.serialize(partition, selection, out, version); } } out.writeBoolean(false); }
public CFMetaData metadata() { return input.metadata(); } }
assert !iterators.isEmpty(); final boolean isForThrift = iterators.get(0).isForThrift(); final CFMetaData metadata = iterators.get(0).metadata();
public UnfilteredPartitions(UnfilteredPartitionIterator input) { super(input); this.isForThrift = input.isForThrift(); }
public void close() { try { compacted.close(); } finally { if (metrics != null) metrics.finishCompaction(this); } }
public UnfilteredRowIterator next() { return compacted.next(); }
public boolean hasNext() { return compacted.hasNext(); }
assert !iterators.isEmpty(); final boolean isForThrift = iterators.get(0).isForThrift(); final CFMetaData metadata = iterators.get(0).metadata();
public UnfilteredPartitions(UnfilteredPartitionIterator input) { super(input); this.isForThrift = input.isForThrift(); }
public void close() { try { compacted.close(); } finally { if (metrics != null) metrics.finishCompaction(this); } }
public UnfilteredRowIterator next() { return compacted.next(); }
public boolean hasNext() { return compacted.hasNext(); }
/** * Digests the the provided iterator. * * @param command the command that has yield {@code iterator}. This can be null if {@code version >= MessagingService.VERSION_30} * as this is only used when producing digest to be sent to legacy nodes. * @param iterator the iterator to digest. * @param digest the {@code MessageDigest} to use for the digest. * @param version the messaging protocol to use when producing the digest. */ public static void digest(ReadCommand command, UnfilteredPartitionIterator iterator, MessageDigest digest, int version) { try (UnfilteredPartitionIterator iter = iterator) { while (iter.hasNext()) { try (UnfilteredRowIterator partition = iter.next()) { UnfilteredRowIterators.digest(command, partition, digest, version); } } } }
return iterators.get(0); final boolean isForThrift = iterators.get(0).isForThrift(); final CFMetaData metadata = iterators.get(0).metadata();
public void serialize(UnfilteredPartitionIterator iter, ColumnFilter selection, DataOutputPlus out, int version) throws IOException { assert version >= MessagingService.VERSION_30; // We handle backward compatibility directy in ReadResponse.LegacyRangeSliceReplySerializer out.writeBoolean(iter.isForThrift()); while (iter.hasNext()) { out.writeBoolean(true); try (UnfilteredRowIterator partition = iter.next()) { UnfilteredRowIteratorSerializer.serializer.serialize(partition, selection, out, version); } } out.writeBoolean(false); }
public UnfilteredPartitions(UnfilteredPartitionIterator input) { super(input); this.isForThrift = input.isForThrift(); }
public CFMetaData metadata() { return input.metadata(); } }
public void close() { try { compacted.close(); } finally { if (metrics != null) metrics.finishCompaction(this); } }
public UnfilteredRowIterator next() { return compacted.next(); }