Package org.apache.cassandra.fql
Class FullQueryLogger
java.lang.Object
org.apache.cassandra.fql.FullQueryLogger
- All Implemented Interfaces:
QueryEvents.Listener
A logger that logs entire query contents after the query finishes (or times out).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final longstatic final Stringstatic final Stringstatic final FullQueryLoggerstatic final Stringprotected static final org.slf4j.Loggerstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbatchSuccess(BatchStatement.Type type, List<? extends CQLStatement> statements, List<String> queries, List<List<ByteBuffer>> values, QueryOptions queryOptions, QueryState queryState, long batchTimeMillis, Message.Response response) Log an invocation of a batch of queriesvoidenable(Path path, String rollCycle, boolean blocking, int maxQueueWeight, long maxLogSize, String archiveCommand, int maxArchiveRetries) voidenableWithoutClean(Path path, String rollCycle, boolean blocking, int maxQueueWeight, long maxLogSize, String archiveCommand, int maxArchiveRetries) voidexecuteSuccess(CQLStatement statement, String query, QueryOptions options, QueryState state, long queryTime, Message.Response response) booleanvoidquerySuccess(CQLStatement statement, String query, QueryOptions queryOptions, QueryState queryState, long queryTimeMillis, Message.Response response) Log a single CQL queryvoidNeed the path as a parameter as well because if the process is restarted the config file might be the only location for retrieving the path to the full query log files, but JMX also allows you to specify a path that isn't persisted anywhere so we have to clean that one as well.voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.cql3.QueryEvents.Listener
batchFailure, executeFailure, prepareFailure, prepareSuccess, queryFailure
-
Field Details
-
logger
protected static final org.slf4j.Logger logger -
CURRENT_VERSION
public static final long CURRENT_VERSION- See Also:
-
VERSION
- See Also:
-
TYPE
- See Also:
-
PROTOCOL_VERSION
- See Also:
-
QUERY_OPTIONS
- See Also:
-
QUERY_START_TIME
- See Also:
-
GENERATED_TIMESTAMP
- See Also:
-
GENERATED_NOW_IN_SECONDS
- See Also:
-
KEYSPACE
- See Also:
-
BATCH
- See Also:
-
SINGLE_QUERY
- See Also:
-
QUERY
- See Also:
-
BATCH_TYPE
- See Also:
-
QUERIES
- See Also:
-
VALUES
- See Also:
-
instance
-
-
Constructor Details
-
FullQueryLogger
public FullQueryLogger()
-
-
Method Details
-
enable
-
enableWithoutClean
-
getFullQueryLoggerOptions
-
stop
public void stop() -
reset
Need the path as a parameter as well because if the process is restarted the config file might be the only location for retrieving the path to the full query log files, but JMX also allows you to specify a path that isn't persisted anywhere so we have to clean that one as well. -
isEnabled
public boolean isEnabled() -
batchSuccess
public void batchSuccess(BatchStatement.Type type, List<? extends CQLStatement> statements, List<String> queries, List<List<ByteBuffer>> values, QueryOptions queryOptions, QueryState queryState, long batchTimeMillis, Message.Response response) Log an invocation of a batch of queries- Specified by:
batchSuccessin interfaceQueryEvents.Listener- Parameters:
type- The type of the batchstatements- the prepared cql statements (unused here)queries- CQL text of the queriesvalues- Values to bind to as parameters for the queriesqueryOptions- Options associated with the query invocationqueryState- Timestamp state associated with the query invocationbatchTimeMillis- Approximate time in milliseconds since the epoch since the batch was invokedresponse- the response from the batch query
-
querySuccess
public void querySuccess(CQLStatement statement, String query, QueryOptions queryOptions, QueryState queryState, long queryTimeMillis, Message.Response response) Log a single CQL query- Specified by:
querySuccessin interfaceQueryEvents.Listener- Parameters:
query- CQL query textqueryOptions- Options associated with the query invocationqueryState- Timestamp state associated with the query invocationqueryTimeMillis- Approximate time in milliseconds since the epoch since the batch was invokedresponse- the response from this query
-
executeSuccess
public void executeSuccess(CQLStatement statement, String query, QueryOptions options, QueryState state, long queryTime, Message.Response response) - Specified by:
executeSuccessin interfaceQueryEvents.Listener
-