查询日志存储在Cassandra中的哪个位置

时间:2013-12-16 08:00:11

标签: cassandra cql

我的问题与Cassandra中运行的查询日志有关。 我有一个cassandra集群。现在,如果我对它运行任何查询,如果需要花费大量时间(例如1小时)来完全执行,那么有没有办法可以跟踪查询的状态,而且不使用任何cassandra API。< / p>

我发现这是因为我们可以将'追踪'变为';在Cassandra-cli中,然后如果我运行任何查询,那么我将获得查询的正确分步状态。

例如:

**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**

但它不符合我的要求,因为我需要查看任何以前运行的查询的状态。

请提供任何解决方案。

由于 SAURABH

1 个答案:

答案 0 :(得分:2)

查看system_traces键空间事件和会话表。