Class SinglePartitionReadCommand.VirtualTableSinglePartitionReadCommand
- All Implemented Interfaces:
Monitorable,ReadQuery,SinglePartitionReadQuery
- Enclosing class:
- SinglePartitionReadCommand
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.db.SinglePartitionReadCommand
SinglePartitionReadCommand.Group, SinglePartitionReadCommand.VirtualTableGroup, SinglePartitionReadCommand.VirtualTableSinglePartitionReadCommandNested classes/interfaces inherited from class org.apache.cassandra.db.ReadCommand
ReadCommand.Kind, ReadCommand.SelectionDeserializer, ReadCommand.Serializer -
Field Summary
Fields inherited from class org.apache.cassandra.db.SinglePartitionReadCommand
clusteringIndexFilter, partitionKey, selectionDeserializerFields inherited from class org.apache.cassandra.db.ReadCommand
dataRange, logger, serializer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVirtualTableSinglePartitionReadCommand(boolean isDigest, int digestVersion, boolean acceptsTransient, TableMetadata metadata, long nowInSec, ColumnFilter columnFilter, RowFilter rowFilter, DataLimits limits, DecoratedKey partitionKey, ClusteringIndexFilter clusteringIndexFilter, Index.QueryPlan indexQueryPlan, boolean trackWarnings, DataRange dataRange) -
Method Summary
Modifier and TypeMethodDescriptionA filter on which (non-PK) columns must be returned by the query.execute(ConsistencyLevel consistency, ClientState state, Dispatcher.RequestTime requestTime) Executes the query at the provided consistency level.executeInternal(ReadExecutionController controller) Execute the query for internal queries (that is, it basically executes the query locally).executeLocally(ReadExecutionController executionController) Executes this command on the local host.Starts a new read operation.executionController(boolean trackRepairedStatus) limits()The limits for the query.metadata()The metadata for the table this is a query on.longnowInSec()The time in seconds to use as "now" for this query.Filters/Resrictions on CQL rows.Recreate the CQL string corresponding to this query.Methods inherited from class org.apache.cassandra.db.SinglePartitionReadCommand
appendCQLWhereClause, clusteringIndexFilter, clusteringIndexFilter, copy, copyAsDigestQuery, copyAsTransientQuery, create, create, create, create, create, create, create, create, forPaging, fullPartitionRead, fullPartitionRead, getTimeout, intersects, isLimitedToOnePartition, isRangeRequest, isReversed, loggableTokens, partitionKey, queryMemtableAndDisk, queryMemtableAndDisk, queryStorage, recordLatency, selectionSerializedSize, selectsFullPartition, serializeSelection, toString, verb, withUpdatedLimitMethods inherited from class org.apache.cassandra.db.ReadCommand
acceptsTransient, copyAsDigestQuery, copyAsDigestQuery, copyAsTransientQuery, copyAsTransientQuery, createEmptyResponse, createMessage, createResponse, dataRange, digestVersion, getCommand, hasPartitionLevelDeletions, hasRequiredStatics, indexQueryPlan, indexSearcher, isDigestQuery, isSinglePartitionRead, isTopK, isTrackingWarnings, maybeValidateIndex, name, setDigestVersion, trackWarnings, withoutPurgeableTombstonesMethods inherited from class org.apache.cassandra.db.monitoring.MonitorableImpl
abort, complete, creationTimeNanos, isAborted, isCompleted, isCrossNode, isInProgress, isSlow, setMonitoringTime, slowTimeoutNanos, timeoutNanosMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.cassandra.db.ReadQuery
columnFilter, dataRange, executeInternal, isEmpty, isTopK, limits, maybeValidateIndex, metadata, nowInSec, rowFilter, trackWarningsMethods inherited from interface org.apache.cassandra.db.SinglePartitionReadQuery
getPager, selectsClustering, selectsKey
-
Constructor Details
-
VirtualTableSinglePartitionReadCommand
protected VirtualTableSinglePartitionReadCommand(boolean isDigest, int digestVersion, boolean acceptsTransient, TableMetadata metadata, long nowInSec, ColumnFilter columnFilter, RowFilter rowFilter, DataLimits limits, DecoratedKey partitionKey, ClusteringIndexFilter clusteringIndexFilter, Index.QueryPlan indexQueryPlan, boolean trackWarnings, DataRange dataRange)
-
-
Method Details
-
execute
public PartitionIterator execute(ConsistencyLevel consistency, ClientState state, Dispatcher.RequestTime requestTime) throws RequestExecutionException Description copied from interface:ReadQueryExecutes the query at the provided consistency level.- Specified by:
executein interfaceReadQuery- Overrides:
executein classSinglePartitionReadCommand- Parameters:
consistency- the consistency level to achieve for the query.state- client staterequestTime- request enqueue / and start times- Returns:
- the result of the query.
- Throws:
RequestExecutionException
-
executeLocally
Description copied from class:ReadCommandExecutes this command on the local host.- Specified by:
executeLocallyin interfaceReadQuery- Overrides:
executeLocallyin classReadCommand- Parameters:
executionController- the execution controller spanning this command- Returns:
- an iterator over the result of executing this command locally.
-
executionController
Description copied from interface:ReadQueryStarts a new read operation.This must be called before
ReadQuery.executeInternal(org.apache.cassandra.db.ReadExecutionController)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.- Specified by:
executionControllerin interfaceReadQuery- Overrides:
executionControllerin classReadCommand- Returns:
- a newly started execution controller for this
ReadQuery.
-
executionController
- Overrides:
executionControllerin classReadCommand
-
metadata
Description copied from interface:ReadQueryThe metadata for the table this is a query on. -
executeInternal
Description copied from interface:ReadQueryExecute the query for internal queries (that is, it basically executes the query locally).- Specified by:
executeInternalin interfaceReadQuery- Parameters:
controller- theReadExecutionControllerprotecting the read.- Returns:
- the result of the query.
-
limits
Description copied from interface:ReadQueryThe limits for the query. -
nowInSec
public long nowInSec()Description copied from interface:ReadQueryThe time in seconds to use as "now" for this query.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).
-
rowFilter
Description copied from interface:ReadQueryFilters/Resrictions on CQL rows.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. -
columnFilter
Description copied from interface:ReadQueryA filter on which (non-PK) columns must be returned by the query.- Specified by:
columnFilterin interfaceReadQuery- Returns:
- which columns must be fetched by this query.
-
toCQLString
Recreate the CQL string corresponding to this query.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.
-