【发布时间】:2014-01-03 13:14:05
【问题描述】:
我的问题与在 Cassandra 中运行的查询日志有关。 我有一个 cassandra 集群。现在,如果我在其上运行任何查询,如果需要大量时间(比如 1 小时)来完全执行,那么有什么方法可以在不使用任何 cassandra API 的情况下跟踪查询的状态。
我发现我们可以打开“跟踪”;在 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**
但它不能满足我的要求,因为我需要查看任何以前运行的查询的状态。
请提供任何解决方案。
谢谢 索拉布
【问题讨论】: