Class AggregationQueryPager.AggregationPartitionIterator
- java.lang.Object
-
- org.apache.cassandra.service.pager.AggregationQueryPager.GroupByPartitionIterator
-
- org.apache.cassandra.service.pager.AggregationQueryPager.AggregationPartitionIterator
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.util.Iterator<RowIterator>,BasePartitionIterator<RowIterator>,PartitionIterator,CloseableIterator<RowIterator>
- Enclosing class:
- AggregationQueryPager
public final class AggregationQueryPager.AggregationPartitionIterator extends AggregationQueryPager.GroupByPartitionIterator
PartitionIteratorfor queries without Group By but with aggregates.For maintaining backward compatibility we are forced to use the
DataLimits.CQLLimitsinstead of theDataLimits.CQLGroupByLimits. Due to that pages need to be fetched in a different way.
-
-
Constructor Summary
Constructors Constructor Description AggregationPartitionIterator(int pageSize, ConsistencyLevel consistency, ClientState clientState, Dispatcher.RequestTime requestTime)AggregationPartitionIterator(int pageSize, ReadExecutionController executionController, Dispatcher.RequestTime requestTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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, java.nio.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, next
-
-
-
-
Constructor Detail
-
AggregationPartitionIterator
public AggregationPartitionIterator(int pageSize, ConsistencyLevel consistency, ClientState clientState, Dispatcher.RequestTime requestTime)
-
AggregationPartitionIterator
public AggregationPartitionIterator(int pageSize, ReadExecutionController executionController, Dispatcher.RequestTime requestTime)
-
-
Method Detail
-
updatePagerLimit
protected QueryPager updatePagerLimit(QueryPager pager, DataLimits limits, java.nio.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
-
-