public class PartitionRangeReadCommand extends ReadCommand
ReadCommand.Kind, ReadCommand.SelectionDeserializer| Modifier and Type | Field and Description |
|---|---|
protected static ReadCommand.SelectionDeserializer |
selectionDeserializer |
logger, serializer| Constructor and Description |
|---|
PartitionRangeReadCommand(boolean isDigest,
boolean isForThrift,
CFMetaData metadata,
int nowInSec,
ColumnFilter columnFilter,
RowFilter rowFilter,
DataLimits limits,
DataRange dataRange) |
PartitionRangeReadCommand(CFMetaData metadata,
int nowInSec,
ColumnFilter columnFilter,
RowFilter rowFilter,
DataLimits limits,
DataRange dataRange) |
| Modifier and Type | Method and Description |
|---|---|
static PartitionRangeReadCommand |
allDataRead(CFMetaData metadata,
int nowInSec)
Creates a new read command that query all the data in the table.
|
protected void |
appendCQLWhereClause(java.lang.StringBuilder sb) |
ClusteringIndexFilter |
clusteringIndexFilter(DecoratedKey key)
The clustering index filter this command to use for the provided key.
|
PartitionRangeReadCommand |
copy()
Returns a copy of this command.
|
DataRange |
dataRange() |
PartitionIterator |
execute(ConsistencyLevel consistency,
ClientState clientState)
Executes the query at the provided consistency level.
|
PartitionRangeReadCommand |
forSubRange(AbstractBounds<PartitionPosition> range) |
QueryPager |
getPager(PagingState pagingState)
Returns a pager for the query.
|
long |
getTimeout()
The configured timeout for this command.
|
boolean |
isNamesQuery() |
PartitionIterator |
postReconciliationProcessing(PartitionIterator result)
Allow to post-process the result of the query after it has been reconciled on the coordinator
but before it is passed to the CQL layer to return the ResultSet.
|
protected UnfilteredPartitionIterator |
queryStorage(ColumnFamilyStore cfs,
ReadOrderGroup orderGroup) |
protected void |
recordLatency(TableMetrics metric,
long latencyNanos) |
protected long |
selectionSerializedSize(int version) |
boolean |
selects(DecoratedKey partitionKey,
Clustering clustering)
Whether the provided row, identified by its primary key components, is selected by
this read command.
|
protected void |
serializeSelection(DataOutputPlus out,
int version) |
java.lang.String |
toString() |
PartitionRangeReadCommand |
withUpdatedLimit(DataLimits newLimits) |
columnFilter, createMessage, createResponse, executeInternal, executeLocally, getIndexSearcher, isDigestQuery, isForThrift, limits, metadata, nowInSec, rowFilter, setIsDigestQuery, startOrderGroup, toCQLString, withoutPurgeableTombstonesprotected static final ReadCommand.SelectionDeserializer selectionDeserializer
public PartitionRangeReadCommand(boolean isDigest,
boolean isForThrift,
CFMetaData metadata,
int nowInSec,
ColumnFilter columnFilter,
RowFilter rowFilter,
DataLimits limits,
DataRange dataRange)
public PartitionRangeReadCommand(CFMetaData metadata, int nowInSec, ColumnFilter columnFilter, RowFilter rowFilter, DataLimits limits, DataRange dataRange)
public static PartitionRangeReadCommand allDataRead(CFMetaData metadata, int nowInSec)
metadata - the table to query.nowInSec - the time in seconds to use are "now" for this query.public DataRange dataRange()
public ClusteringIndexFilter clusteringIndexFilter(DecoratedKey key)
ReadCommandNote that that method should only be called on a key actually queried by this command and in practice, this will almost always return the same filter, but for the sake of paging, the filter on the first key of a range command might be slightly different.
clusteringIndexFilter in class ReadCommandkey - a partition key queried by this command.ClusteringIndexFilter to use for the partition of key key.public boolean isNamesQuery()
public PartitionRangeReadCommand forSubRange(AbstractBounds<PartitionPosition> range)
public PartitionRangeReadCommand copy()
ReadCommandcopy in class ReadCommandpublic PartitionRangeReadCommand withUpdatedLimit(DataLimits newLimits)
public long getTimeout()
ReadCommandgetTimeout in class ReadCommandpublic boolean selects(DecoratedKey partitionKey, Clustering clustering)
ReadCommandselects in class ReadCommandpartitionKey - the partition key for the row to test.clustering - the clustering for the row to test.partitionKey and clustering
clustering is selected by this command.public PartitionIterator execute(ConsistencyLevel consistency, ClientState clientState) throws RequestExecutionException
ReadQueryconsistency - the consistency level to achieve for the query.clientState - the ClientState for the query. In practice, this can be null unless
consistency is a serial consistency.RequestExecutionExceptionpublic QueryPager getPager(PagingState pagingState)
ReadQuerypagingState - the PagingState to start from if this is a paging continuation. This can be
null if this is the start of paging.protected void recordLatency(TableMetrics metric, long latencyNanos)
recordLatency in class ReadCommandprotected UnfilteredPartitionIterator queryStorage(ColumnFamilyStore cfs, ReadOrderGroup orderGroup)
queryStorage in class ReadCommandprotected void appendCQLWhereClause(java.lang.StringBuilder sb)
appendCQLWhereClause in class ReadCommandpublic PartitionIterator postReconciliationProcessing(PartitionIterator result)
public java.lang.String toString()
toString in class java.lang.Objectprotected void serializeSelection(DataOutputPlus out, int version) throws java.io.IOException
serializeSelection in class ReadCommandjava.io.IOExceptionprotected long selectionSerializedSize(int version)
selectionSerializedSize in class ReadCommandCopyright © 2015 The Apache Software Foundation