“nodetool compact”对DateTieredCompactionStrategy有什么作用?

pio*_*est 6 cassandra nodetool datastax cassandra-2.0

nodetool compact 的文档说

此命令在使用 SizeTieredCompactionStrategy 和 DateTieredCompactionStrategy 的表上启动压缩过程。您可以指定用于压缩的键空间。

但是它对 DateTieredCompactionStrategy 有什么作用呢?

附带问题:什么是-s, --split-output参数?解释为:Use -s to not create a single big file。我很困惑 - 这不是目的nodetool compact吗?

pha*_*act 5

即使使用 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.
Run Code Online (Sandbox Code Playgroud)

在 DTCS -s 上不会做任何特殊的事情(仍然会创建一个大的 sstable)