我看了看nodetool和jmx,并没有找到相关的功能,但是不确定是不是自己漏掉了。
Bringing together the Apache Cassandra experts from the community and DataStax.
Want to learn? Have a question? Want to share your expertise? You are in the right place!
Not sure where to begin? Getting Started
读取Commitlog内容的开源代码,很久以前Apache Cassandra Committer的圈子里提到过这个:https://github.com/carloscm/cassandra-commitlog-extract。但是这个现在没法直接拿来用,因为是Cassandra的史前时代(2012年)写的。只能看看有没有借鉴意义。
新一点的代码里,CDC(Change Data Capture)也需要读CommitLog,可以看看这里的函数调用:https://github.com/apache/cassandra/blob/e31e216234c6b57a531cae607e0355666007deb2/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L132-L140,有一个叫org.apache.cassandra.db.commitlog.CommitLogReader的类可以直接拿来用。CDC的这个文档里有提及:http://cassandra.apache.org/doc/latest/operating/cdc.html#reading-commitlogsegments
5 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2022 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use