public class PartitionRangeReadCommand extends ReadCommand
ReadCommand.Kind, ReadCommand.SelectionDeserializer
Modifier and Type | Field and Description |
---|---|
protected static ReadCommand.SelectionDeserializer |
selectionDeserializer |
legacyPagedRangeCommandSerializer, legacyRangeSliceCommandSerializer, legacyReadCommandSerializer, logger, pagedRangeSerializer, rangeSliceSerializer, readSerializer, serializer
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.
|
PartitionRangeReadCommand |
copyAsDigestQuery()
Returns a copy of this command with isDigestQuery set to true.
|
static PartitionRangeReadCommand |
create(boolean isForThrift,
CFMetaData metadata,
int nowInSec,
ColumnFilter columnFilter,
RowFilter rowFilter,
DataLimits limits,
DataRange dataRange) |
MessageOut<ReadCommand> |
createMessage(int version)
Creates a message for 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,
int protocolVersion)
Returns a pager for the query.
|
long |
getTimeout()
The configured timeout for this command.
|
boolean |
isLimitedToOnePartition() |
boolean |
isNamesQuery() |
boolean |
isReversed()
Whether the underlying
ClusteringIndexFilter is reversed or not. |
protected int |
oldestUnrepairedTombstone() |
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.
|
UnfilteredPartitionIterator |
queryStorage(ColumnFamilyStore cfs,
ReadOrderGroup orderGroup) |
protected void |
recordLatency(TableMetrics metric,
long latencyNanos) |
protected long |
selectionSerializedSize(int version) |
boolean |
selectsClustering(DecoratedKey key,
Clustering clustering) |
boolean |
selectsFullPartition()
Checks if this
ReadQuery selects full partitions, that is it has no filtering on clustering or regular columns. |
boolean |
selectsKey(DecoratedKey key) |
protected void |
serializeSelection(DataOutputPlus out,
int version) |
java.lang.String |
toString() |
PartitionRangeReadCommand |
withUpdatedDataRange(DataRange newDataRange) |
PartitionRangeReadCommand |
withUpdatedLimitsAndDataRange(DataLimits newLimits,
DataRange newDataRange) |
columnFilter, createResponse, digestVersion, executeInternal, executeLocally, getIndex, indexMetadata, isDigestQuery, isForThrift, limits, maybeValidateIndex, metadata, nowInSec, rowFilter, setDigestVersion, startOrderGroup, toCQLString, withoutPurgeableTombstones
protected static final ReadCommand.SelectionDeserializer selectionDeserializer
public static PartitionRangeReadCommand create(boolean isForThrift, 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)
ReadCommand
Note 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 ReadCommand
key
- 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()
ReadCommand
copy
in class ReadCommand
public PartitionRangeReadCommand copyAsDigestQuery()
ReadCommand
copyAsDigestQuery
in class ReadCommand
public PartitionRangeReadCommand withUpdatedDataRange(DataRange newDataRange)
public PartitionRangeReadCommand withUpdatedLimitsAndDataRange(DataLimits newLimits, DataRange newDataRange)
public long getTimeout()
ReadCommand
getTimeout
in class ReadCommand
public boolean isReversed()
ReadCommand
ClusteringIndexFilter
is reversed or not.isReversed
in class ReadCommand
ClusteringIndexFilter
is reversed or not.public boolean selectsKey(DecoratedKey key)
public boolean selectsClustering(DecoratedKey key, Clustering clustering)
public PartitionIterator execute(ConsistencyLevel consistency, ClientState clientState) throws RequestExecutionException
ReadQuery
consistency
- 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.RequestExecutionException
public QueryPager getPager(PagingState pagingState, int protocolVersion)
ReadQuery
pagingState
- the PagingState
to start from if this is a paging continuation. This can be
null
if this is the start of paging.protocolVersion
- the protocol version to use for the paging state of that pager.protected void recordLatency(TableMetrics metric, long latencyNanos)
recordLatency
in class ReadCommand
public UnfilteredPartitionIterator queryStorage(ColumnFamilyStore cfs, ReadOrderGroup orderGroup)
queryStorage
in class ReadCommand
protected int oldestUnrepairedTombstone()
oldestUnrepairedTombstone
in class ReadCommand
public MessageOut<ReadCommand> createMessage(int version)
ReadCommand
createMessage
in class ReadCommand
protected void appendCQLWhereClause(java.lang.StringBuilder sb)
appendCQLWhereClause
in class ReadCommand
public PartitionIterator postReconciliationProcessing(PartitionIterator result)
public boolean selectsFullPartition()
ReadQuery
ReadQuery
selects full partitions, that is it has no filtering on clustering or regular columns.true
if this ReadQuery
selects full partitions, false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
protected void serializeSelection(DataOutputPlus out, int version) throws java.io.IOException
serializeSelection
in class ReadCommand
java.io.IOException
protected long selectionSerializedSize(int version)
selectionSerializedSize
in class ReadCommand
public boolean isLimitedToOnePartition()
isLimitedToOnePartition
in class ReadCommand
Copyright © 2009- The Apache Software Foundation