3

文档中它说 SizeTieredCompactionStrategy (STCS) 是默认的压缩策略。

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

4

1 回答 1

6

在每个表上定义压缩策略

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'}
    ...
    ...;
于 2016-01-18T17:40:00.003 回答