【问题标题】:What does "nodetool compact" do for DateTieredCompactionStrategy?“nodetool compact”对 DateTieredCompactionStrategy 有什么作用?
【发布时间】:2016-04-03 10:23:55
【问题描述】:

The documentation for nodetool compact says:

此命令在使用 SizeTieredCompactionStrategy 和 DateTieredCompactionStrategy。你可以 为压缩指定一个键空间。

但它对 DateTieredCompactionStrategy 有什么作用?

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

【问题讨论】:

    标签: cassandra cassandra-2.0 datastax nodetool


    【解决方案1】:

    即使使用 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)

    【讨论】:

    • 非常感谢您的回答!附带问题:当一两天的压缩被破坏(直到节点重新启动)并且在此期间节点创建了 2000 个 SSTables 而没有压缩它们时,我能做什么?
    • 它是怎么坏掉的?您是否关闭了自动压缩功能?
    • 我不确定,但有两个选项:1. nodetool 修复失败,它没有清除/压缩创建 2000 个 sstables,或者 2. 在 nodetool 修复失败后,一个错误停止了自动压缩,直到重启。
    • 更有可能您的修复刚刚生成了很多 sstables。自动压缩仍在运行,但有点落后。你在运行 vnode 吗?
    • 是的,这也是可能的。问题是生成的 sstables 的年龄超过了 max_sstable_age_days。因此,那些许多 sstables 不会被自动压缩。是的,我正在使用 vnodes。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-12-07
    • 1970-01-01
    • 1970-01-01
    • 2015-11-27
    • 2015-04-12
    • 2018-10-07
    • 2014-11-21
    相关资源
    最近更新 更多