简体   繁体   English

Titan 和 Cassandra 调试和分析查询

[英]Titan and Cassandra debugging and profiling queries

When using the Cassandra backend, is it possible to see the Cassandra queries are being executed from Titan , and how long each query takes?使用 Cassandra 后端时,是否可以看到正在从Titan执行 Cassandra 查询,以及每个查询需要多长时间? Ideally it would output to standard error, or a log file.理想情况下,它会输出到标准错误或日志文件。

This can possibly help optimise the structure of my queries if I can see any inefficiencies in the way Titan is talking to Cassandra.如果我发现 Titan 与 Cassandra 交谈的方式存在任何低效之处,这可能有助于优化我的查询结构。

Thanks to one of the authors of Titan, an acceptable way is to enable debugging in Cassandra .感谢 Titan 的一位作者,一种可接受的方法是在 Cassandra 中启用调试

You can do this by uncommenting the DEBUG lines in the cassandra log4j-server.properties file, then restarting Cassandra:您可以通过取消注释 cassandra log4j-server.properties 文件中的 DEBUG 行,然后重新启动 Cassandra 来完成此操作:

log4j.logger.org.apache.cassandra=DEBUG
log4j.logger.org.apache.cassandra.db=DEBUG
log4j.logger.org.apache.cassandra.service.StorageProxy=DEBUG

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM