public static class SinglePartitionReadCommand.VirtualTableSinglePartitionReadCommand extends SinglePartitionReadCommand
SinglePartitionReadCommand.Group, SinglePartitionReadCommand.VirtualTableGroup, SinglePartitionReadCommand.VirtualTableSinglePartitionReadCommand
ReadCommand.CheckForAbort, ReadCommand.Kind, ReadCommand.SelectionDeserializer, ReadCommand.Serializer
clusteringIndexFilter, partitionKey, selectionDeserializer
logger, serializer
Modifier | Constructor and Description |
---|---|
protected |
VirtualTableSinglePartitionReadCommand(boolean isDigest,
int digestVersion,
boolean acceptsTransient,
TableMetadata metadata,
int nowInSec,
ColumnFilter columnFilter,
RowFilter rowFilter,
DataLimits limits,
DecoratedKey partitionKey,
ClusteringIndexFilter clusteringIndexFilter,
IndexMetadata index,
boolean trackWarnings) |
Modifier and Type | Method and Description |
---|---|
ColumnFilter |
columnFilter()
A filter on which (non-PK) columns must be returned by the query.
|
PartitionIterator |
execute(ConsistencyLevel consistency,
ClientState state,
long queryStartNanoTime)
Executes the query at the provided consistency level.
|
PartitionIterator |
executeInternal(ReadExecutionController controller)
Execute the query for internal queries (that is, it basically executes the query locally).
|
UnfilteredPartitionIterator |
executeLocally(ReadExecutionController executionController)
Executes this command on the local host.
|
ReadExecutionController |
executionController()
Starts a new read operation.
|
ReadExecutionController |
executionController(boolean trackRepairedStatus) |
DataLimits |
limits()
The limits for the query.
|
TableMetadata |
metadata()
The metadata for the table this is a query on.
|
int |
nowInSec()
The time in seconds to use as "now" for this query.
|
RowFilter |
rowFilter()
Filters/Resrictions on CQL rows.
|
java.lang.String |
toCQLString()
Recreate the CQL string corresponding to this query.
|
appendCQLWhereClause, clusteringIndexFilter, clusteringIndexFilter, copy, copyAsDigestQuery, copyAsTransientQuery, create, create, create, create, create, create, create, create, forPaging, fullPartitionRead, fullPartitionRead, getTimeout, isLimitedToOnePartition, isRangeRequest, isReversed, loggableTokens, partitionKey, queryMemtableAndDisk, queryStorage, recordLatency, selectionSerializedSize, selectsFullPartition, serializeSelection, toString, verb, withUpdatedLimit
acceptsTransient, copyAsDigestQuery, copyAsDigestQuery, copyAsTransientQuery, copyAsTransientQuery, createEmptyResponse, createMessage, createResponse, digestVersion, getCommand, getIndex, indexMetadata, isDigestQuery, isTrackingWarnings, maybeValidateIndex, name, setDigestVersion, trackWarnings, withoutPurgeableTombstones, withStateTracking
abort, complete, creationTimeNanos, isAborted, isCompleted, isCrossNode, isInProgress, isSlow, setMonitoringTime, slowTimeoutNanos, timeoutNanos
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createGroup, getPager, selectsClustering, selectsKey
columnFilter, empty, executeInternal, isEmpty, limits, maybeValidateIndex, metadata, nowInSec, rowFilter, trackWarnings
protected VirtualTableSinglePartitionReadCommand(boolean isDigest, int digestVersion, boolean acceptsTransient, TableMetadata metadata, int nowInSec, ColumnFilter columnFilter, RowFilter rowFilter, DataLimits limits, DecoratedKey partitionKey, ClusteringIndexFilter clusteringIndexFilter, IndexMetadata index, boolean trackWarnings)
public PartitionIterator execute(ConsistencyLevel consistency, ClientState state, long queryStartNanoTime) throws RequestExecutionException
ReadQuery
execute
in interface ReadQuery
execute
in class SinglePartitionReadCommand
consistency
- the consistency level to achieve for the query.state
- client stateRequestExecutionException
public UnfilteredPartitionIterator executeLocally(ReadExecutionController executionController)
ReadCommand
executeLocally
in interface ReadQuery
executeLocally
in class ReadCommand
executionController
- the execution controller spanning this commandpublic ReadExecutionController executionController()
ReadQuery
This must be called before executeInternal
and passed to it to protect the read.
The returned object must be closed on all path and it is thus strongly advised to
use it in a try-with-ressource construction.
executionController
in interface ReadQuery
executionController
in class ReadCommand
ReadQuery
.public ReadExecutionController executionController(boolean trackRepairedStatus)
executionController
in class ReadCommand
public TableMetadata metadata()
ReadQuery
public PartitionIterator executeInternal(ReadExecutionController controller)
ReadQuery
executeInternal
in interface ReadQuery
controller
- the ReadExecutionController
protecting the read.public DataLimits limits()
ReadQuery
public int nowInSec()
ReadQuery
We use the same time as "now" for the whole query to avoid considering different values as expired during the query, which would be buggy (would throw of counting amongst other things).
public RowFilter rowFilter()
ReadQuery
This contains the restrictions that are not directly handled by the
ClusteringIndexFilter
. More specifically, this includes any non-PK column
restrictions and can include some PK columns restrictions when those can't be
satisfied entirely by the clustering index filter (because not all clustering columns
have been restricted for instance). If there is 2ndary indexes on the table,
one of this restriction might be handled by a 2ndary index.
public ColumnFilter columnFilter()
ReadQuery
columnFilter
in interface ReadQuery
public java.lang.String toCQLString()
Note that in general the returned string will not be exactly the original user string, first because there isn't always a single syntax for a given query, but also because we don't have all the information needed (we know the non-PK columns queried but not the PK ones as internally we query them all). So this shouldn't be relied too strongly, but this should be good enough for debugging purpose which is what this is for.
Copyright © 2009- The Apache Software Foundation