Class ScanAllRangesCommandIterator
java.lang.Object
org.apache.cassandra.utils.AbstractIterator<RowIterator>
org.apache.cassandra.service.reads.range.RangeCommandIterator
org.apache.cassandra.service.reads.range.ScanAllRangesCommandIterator
- All Implemented Interfaces:
com.google.common.collect.PeekingIterator<RowIterator>,AutoCloseable,Iterator<RowIterator>,BasePartitionIterator<RowIterator>,PartitionIterator,CloseableIterator<RowIterator>
A custom
RangeCommandIterator that queries all replicas required by consistency level at once with data range
specify in PartitionRangeReadCommand.
This is to speed up Index.QueryPlan.isTopK() queries that needs to find global top-k rows in the cluster, because
existing RangeCommandIterator has to execute a top-k search per vnode range which is wasting resources.
The implementation combines the replica plans for each data range into a single shared replica plan. This results in
queries using reconciliation where it may not be expected. This is handled in the DataResolver for top-K queries
so any usage for queries other that top-K should bear this in mind.
It is important to note that this implementation can only be used with ConsistencyLevel.ONE and ConsistencyLevel.LOCAL_ONE
-
Field Summary
Fields inherited from class org.apache.cassandra.service.reads.range.RangeCommandIterator
rangeMetrics -
Method Summary
Methods inherited from class org.apache.cassandra.service.reads.range.RangeCommandIterator
close, computeNextMethods inherited from class org.apache.cassandra.utils.AbstractIterator
endOfData, hasNext, next, peek, removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext
-
Method Details
-
sendNextRequests
-