The documentation for nodetool compact says :
This command starts the compaction process on tables that use the SizeTieredCompactionStrategy and DateTieredCompactionStrategy. You can specify a keyspace for compaction.
但是它对 DateTieredCompactionStrategy 有什么作用呢?
附带问题:什么是
-s, --split-output
范围?解释为:Use -s to not create a single big file
.我很困惑 - 这不是 nodetool compact
的目的吗? ?
最佳答案
即使使用 DTCS,没有标志的 Nodetool compact 仍然会创建一个大的单个文件。
-s, --split-output 选项仅从 c* 2.2 及更高版本开始。
news.txt 指出:
+ It is also possible to split output when doing a major compaction with
+ STCS - files will be split in sizes 50%, 25%, 12.5% etc of the total size.
+ This might be a bit better than old major compactions which created one big
+ file on disk.
在 DTCS -s 上不会做任何特别的事情(仍然会创建一个大的 sstable)
关于cassandra - "nodetool compact"对 DateTieredCompactionStrategy 有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34512672/