user3106356
user3106356

Reputation: 31

where does query logs store in Cassandra

My question is related to Logs of Queries ran in Cassandra. I have a cassandra Cluster. Now , if i run any query on it which if takes good amount of time ( say 1 hour ) to completely execute, then is there any way with which I can trace the status of the query and that too without using any cassandra API.

What I found regarding this is that we can turn 'tracing ON;' in Cassandra-cli, and then if I run any query, then I'll get the proper step-by-step status of the query.

For example :

**cqlsh> use demo;
cqlsh:demo> CREATE TABLE test (   a int PRIMARY KEY,   b text );
cqlsh:demo> tracing on;
Now tracing requests.
cqlsh:demo> INSERT INTO test (a, b) VALUES (1, 'example');
Unable to complete request: one or more nodes were unavailable.
Tracing session: 4dc5f950-6625-11e3-841a-b7e2b08eed3e
 activity                                               | timestamp    | source         | source_elapsed
--------------------------------------------------------+--------------+----------------+----------------
                                     execute_cql3_query | 13:10:15,627 | 192.168.171.87 |              0
 Parsing INSERT INTO test (a, b) VALUES (1, 'example'); | 13:10:15,640 | 192.168.171.87 |          13770
                                    Preparing statement | 13:10:15,657 | 192.168.171.87 |          30090
                      Determining replicas for mutation | 13:10:15,669 | 192.168.171.87 |          42689
                                            Unavailable | 13:10:15,682 | 192.168.171.87 |          55131
                                       Request complete | 13:10:15,682 | 192.168.171.87 |          55303**

But it does not satisfy my requirement as I need to see the status of any previously ran query.

Please provide any solution.

Thanks Saurabh

Upvotes: 3

Views: 4396

Answers (1)

dkblinux98
dkblinux98

Reputation: 386

Take a look at the system_traces keyspace events and sessions tables.

Upvotes: 4

Related Questions