public class FullQueryLogger extends java.lang.Object implements QueryEvents.Listener
Modifier and Type | Class and Description |
---|---|
static class |
FullQueryLogger.Batch |
static class |
FullQueryLogger.Query |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BATCH |
static java.lang.String |
BATCH_TYPE |
static long |
CURRENT_VERSION |
static java.lang.String |
GENERATED_NOW_IN_SECONDS |
static java.lang.String |
GENERATED_TIMESTAMP |
static FullQueryLogger |
instance |
static java.lang.String |
KEYSPACE |
protected static org.slf4j.Logger |
logger |
static java.lang.String |
PROTOCOL_VERSION |
static java.lang.String |
QUERIES |
static java.lang.String |
QUERY |
static java.lang.String |
QUERY_OPTIONS |
static java.lang.String |
QUERY_START_TIME |
static java.lang.String |
SINGLE_QUERY |
static java.lang.String |
TYPE |
static java.lang.String |
VALUES |
static java.lang.String |
VERSION |
Constructor and Description |
---|
FullQueryLogger() |
Modifier and Type | Method and Description |
---|---|
void |
batchSuccess(BatchStatement.Type type,
java.util.List<? extends CQLStatement> statements,
java.util.List<java.lang.String> queries,
java.util.List<java.util.List<java.nio.ByteBuffer>> values,
QueryOptions queryOptions,
QueryState queryState,
long batchTimeMillis,
Message.Response response)
Log an invocation of a batch of queries
|
void |
enable(java.nio.file.Path path,
java.lang.String rollCycle,
boolean blocking,
int maxQueueWeight,
long maxLogSize,
java.lang.String archiveCommand,
int maxArchiveRetries) |
void |
enableWithoutClean(java.nio.file.Path path,
java.lang.String rollCycle,
boolean blocking,
int maxQueueWeight,
long maxLogSize,
java.lang.String archiveCommand,
int maxArchiveRetries) |
void |
executeSuccess(CQLStatement statement,
java.lang.String query,
QueryOptions options,
QueryState state,
long queryTime,
Message.Response response) |
FullQueryLoggerOptions |
getFullQueryLoggerOptions() |
boolean |
isEnabled() |
void |
querySuccess(CQLStatement statement,
java.lang.String query,
QueryOptions queryOptions,
QueryState queryState,
long queryTimeMillis,
Message.Response response)
Log a single CQL query
|
void |
reset(java.lang.String fullQueryLogPath)
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.
|
void |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
batchFailure, executeFailure, prepareFailure, prepareSuccess, queryFailure
protected static final org.slf4j.Logger logger
public static final long CURRENT_VERSION
public static final java.lang.String VERSION
public static final java.lang.String TYPE
public static final java.lang.String PROTOCOL_VERSION
public static final java.lang.String QUERY_OPTIONS
public static final java.lang.String QUERY_START_TIME
public static final java.lang.String GENERATED_TIMESTAMP
public static final java.lang.String GENERATED_NOW_IN_SECONDS
public static final java.lang.String KEYSPACE
public static final java.lang.String BATCH
public static final java.lang.String SINGLE_QUERY
public static final java.lang.String QUERY
public static final java.lang.String BATCH_TYPE
public static final java.lang.String QUERIES
public static final java.lang.String VALUES
public static final FullQueryLogger instance
public void enable(java.nio.file.Path path, java.lang.String rollCycle, boolean blocking, int maxQueueWeight, long maxLogSize, java.lang.String archiveCommand, int maxArchiveRetries)
public void enableWithoutClean(java.nio.file.Path path, java.lang.String rollCycle, boolean blocking, int maxQueueWeight, long maxLogSize, java.lang.String archiveCommand, int maxArchiveRetries)
public FullQueryLoggerOptions getFullQueryLoggerOptions()
public void stop()
public void reset(java.lang.String fullQueryLogPath)
public boolean isEnabled()
public void batchSuccess(BatchStatement.Type type, java.util.List<? extends CQLStatement> statements, java.util.List<java.lang.String> queries, java.util.List<java.util.List<java.nio.ByteBuffer>> values, QueryOptions queryOptions, QueryState queryState, long batchTimeMillis, Message.Response response)
batchSuccess
in interface QueryEvents.Listener
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 querypublic void querySuccess(CQLStatement statement, java.lang.String query, QueryOptions queryOptions, QueryState queryState, long queryTimeMillis, Message.Response response)
querySuccess
in interface QueryEvents.Listener
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 querypublic void executeSuccess(CQLStatement statement, java.lang.String query, QueryOptions options, QueryState state, long queryTime, Message.Response response)
executeSuccess
in interface QueryEvents.Listener
Copyright © 2009-2022 The Apache Software Foundation