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>
,java.lang.AutoCloseable
,java.util.Iterator<RowIterator>
,BasePartitionIterator<RowIterator>
,PartitionIterator
,CloseableIterator<RowIterator>
public class ScanAllRangesCommandIterator extends RangeCommandIterator
A customRangeCommandIterator
that queries all replicas required by consistency level at once with data range specify inPartitionRangeReadCommand
.This is to speed up
Index.QueryPlan.isTopK()
queries that needs to find global top-k rows in the cluster, because existingRangeCommandIterator
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
andConsistencyLevel.LOCAL_ONE
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.service.reads.range.RangeCommandIterator
rangeMetrics
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PartitionIterator
sendNextRequests()
-
Methods inherited from class org.apache.cassandra.service.reads.range.RangeCommandIterator
close, computeNext
-
Methods inherited from class org.apache.cassandra.utils.AbstractIterator
endOfData, hasNext, next, peek, remove
-
-
-
-
Method Detail
-
sendNextRequests
protected PartitionIterator sendNextRequests()
-
-