1) How can we know if compaction is disabled on a table (possibly done by nodetool disableautocompaction)
2) How to know compaction history of specific keyspace/table?
1) How can we know if compaction is disabled on a table (possibly done by nodetool disableautocompaction)
2) How to know compaction history of specific keyspace/table?
Disabling compaction on a table requires a schema change so you need to check the table's schema to see if compaction is disabled.
Here's an example for disabling compaction on a table:
ALTER TABLE vaccinated WITH COMPACTION = { 'class': 'SizeTieredCompactionStrategy', 'enabled': 'false' };
For details, see Enabling and disabling background compaction.
There isn't a command for checking the compaction history of a specific table. The nodetool compactionhistory
command simply displays the contents of the system.compaction_history
table. You can either (1) parse the output of the command using shell scripts, or (2) query the CQL table directly.
For auto-compaction, there isn't a simple way of checking if it has been disabled on a node other than checking the outputs of compaction stats or compaction history. Cheers!
@pramod.dba31_92912 , you could refer to the below documentation to understand the options available,
I am looking for specifically with respect to table. As from the documentations I haven't found any thing relative. So looking if there is any other way or am I missing any thing here.
You could very much do this to get the stats for a given table within a keyspace,
nodetool <options> getcompactionthreshold -- <keyspace> <table>
8 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