Cassandra 中的压实总时间

问题描述

有什么方法可以找到特定表的压缩所花费的确切时间,或者使用 nodetool 或 opscenter 在 Cassandra 中开始或结束压缩所花费的时间。找不到。

解决方法

我认为您会找到的最接近的是 nodetool compactionstats。如果压缩正在积极运行,您将能够看到它们排队,以及完成百分比和剩余时间的估计。

DataStax docs - nodetool compactionstats

pending tasks: 5
                compaction type        keyspace           table       completed           total      unit     progress
                Compaction            Keyspace1       Standard1       282310680       302170540     bytes       93.43%
                Compaction            Keyspace1       Standard1        58457931       307520780     bytes       19.01%
                Active compaction remaining time :   0h00m16s