Class AggregationQueryPager.AggregationPartitionIterator
java.lang.Object
org.apache.cassandra.service.pager.AggregationQueryPager.GroupByPartitionIterator
org.apache.cassandra.service.pager.AggregationQueryPager.AggregationPartitionIterator
- All Implemented Interfaces:
AutoCloseable,Iterator<RowIterator>,BasePartitionIterator<RowIterator>,PartitionIterator,CloseableIterator<RowIterator>
- Enclosing class:
- AggregationQueryPager
public final class AggregationQueryPager.AggregationPartitionIterator
extends AggregationQueryPager.GroupByPartitionIterator
PartitionIterator for queries without Group By but with aggregates.
For maintaining backward compatibility we are forced to use the DataLimits.CQLLimits instead of the
DataLimits.CQLGroupByLimits. Due to that pages need to be fetched in a different way.
-
Constructor Summary
ConstructorsConstructorDescriptionAggregationPartitionIterator(int pageSize, ConsistencyLevel consistency, ClientState clientState, Dispatcher.RequestTime requestTime) AggregationPartitionIterator(int pageSize, ReadExecutionController executionController, Dispatcher.RequestTime requestTime) -
Method Summary
Modifier and TypeMethodDescriptionprotected intcomputeSubPageSize(int pageSize, int counted) Computes the size of the next sub-page to retrieve.protected booleanisDone(int pageSize, int counted) protected QueryPagerupdatePagerLimit(QueryPager pager, DataLimits limits, ByteBuffer lastPartitionKey, Clustering<?> lastClustering) Updates the pager with the new limits if needed.Methods inherited from class org.apache.cassandra.service.pager.AggregationQueryPager.GroupByPartitionIterator
close, hasNext, nextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
AggregationPartitionIterator
public AggregationPartitionIterator(int pageSize, ConsistencyLevel consistency, ClientState clientState, Dispatcher.RequestTime requestTime) -
AggregationPartitionIterator
public AggregationPartitionIterator(int pageSize, ReadExecutionController executionController, Dispatcher.RequestTime requestTime)
-
-
Method Details
-
updatePagerLimit
protected QueryPager updatePagerLimit(QueryPager pager, DataLimits limits, ByteBuffer lastPartitionKey, Clustering<?> lastClustering) Description copied from class:AggregationQueryPager.GroupByPartitionIteratorUpdates the pager with the new limits if needed.- Overrides:
updatePagerLimitin classAggregationQueryPager.GroupByPartitionIterator- Parameters:
pager- the pager previoulsy usedlimits- the DataLimitslastPartitionKey- the partition key of the last row returnedlastClustering- the clustering of the last row returned- Returns:
- the pager to use to query the next page of data
-
isDone
protected boolean isDone(int pageSize, int counted) - Overrides:
isDonein classAggregationQueryPager.GroupByPartitionIterator
-
computeSubPageSize
protected int computeSubPageSize(int pageSize, int counted) Description copied from class:AggregationQueryPager.GroupByPartitionIteratorComputes the size of the next sub-page to retrieve.- Overrides:
computeSubPageSizein classAggregationQueryPager.GroupByPartitionIterator- Parameters:
pageSize- the top-level page sizecounted- the number of result returned so far by the previous sub-pages- Returns:
- the size of the next sub-page to retrieve
-