即使集群空闲,cassandra sstable文件也不会被压缩

时间:2014-04-13 13:18:31

标签: cassandra

我创建了一个由3个cassandras组成的集群,并创建了一个向数据集提供数据的过程。饲料过程非常强调群集的大约10000批次/秒,并连续运行几天。如此有效,cassandra创造了许多稳定的文件,它几乎不断地压缩这些文件。但是这些文件堆积如山,我目前在70GB /节点数据库(总共200GB)上有300个。但即使我停止了Feed并且群集处于空闲状态,它们似乎也不会继续压缩,并且文件数量会保持很大。有没有办法强制cassandra压缩大部分文件?

我正在使用水平压缩,这是我的一个表:

CREATE TABLE data (
id bigint,
data blob,
PRIMARY KEY (id)
) WITH
bloom_filter_fp_chance=0.100000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
index_interval=128 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
default_time_to_live=0 AND
speculative_retry='99.0PERCENTILE' AND
memtable_flush_period_in_ms=0 AND
compaction={'class': 'LeveledCompactionStrategy'} AND
compression={'sstable_compression': 'LZ4Compressor'};

1 个答案:

答案 0 :(得分:0)

运行nodetool flush,然后运行nodetool compact。当SSTable增长超过你在cassandra.yaml中提到的阈值时,Cassandra会压缩。默认情况下,每当sstables的数量增加到4时,它就会被压缩为一个。