如何获得C *集群的压缩策略?

时间:2016-01-18 17:32:35

标签: cassandra nodetool

documentation中,它表示SizeTieredCompactionStrategy(STCS)是默认的压缩策略。

如何获得群集的实际压缩策略?

1 个答案:

答案 0 :(得分:5)

压缩策略在每个表

上定义

cqlsh

cqlsh:music> DESCRIBE TABLE artists;

CREATE TABLE music.artists (
    name text PRIMARY KEY,
    born text,
    country text,
    died text,
    gender text,
    styles list<text>,
    type text
) WITH bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
    AND comment = ''
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
    ...
    ...;