Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
对于TTL',将gc#u grace#u秒减少到0;Cassandra中的ed数据_Cassandra - Fatal编程技术网

对于TTL',将gc#u grace#u秒减少到0;Cassandra中的ed数据

对于TTL',将gc#u grace#u秒减少到0;Cassandra中的ed数据,cassandra,Cassandra,如果表只包含TTL’ed数据(没有手动删除),将gc_grace_秒数减少到0(或其他一些非常低的秒数)有意义吗?表的默认时间设置为30天。另外,如前所述, 在单节点集群中,此属性可以安全地设置为零。你 还可以减少数据未显式更新的表的此值 已删除-例如,仅包含TTL集合数据的表 模式的更多细节 CREATE TABLE Foo ( user_uuid uuid, ts bigint, ... //skipped a few columns PRIMARY KEY (user_uuid, ts,

如果表只包含TTL’ed数据(没有手动删除),将gc_grace_秒数减少到0(或其他一些非常低的秒数)有意义吗?表的默认时间设置为30天。另外,如前所述,

在单节点集群中,此属性可以安全地设置为零。你 还可以减少数据未显式更新的表的此值 已删除-例如,仅包含TTL集合数据的表

模式的更多细节

CREATE TABLE Foo (
user_uuid uuid,
ts bigint,
... //skipped a few columns
PRIMARY KEY (user_uuid, ts, event_uuid)
) WITH CLUSTERING ORDER BY (ts DESC, event_uuid ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '24', 'compaction_window_unit': 'HOURS', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 2592000
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';

您需要小心,就像使用
gc\u grace\u seconds
一样,您可以有效地禁用提示收集,因此,如果节点甚至停机5分钟,您需要进行修复。在Cassandra 3.0中,提示遵循值
gc\u grace\u seconds
,如果比max\u hints\u window短,则仅在该时间段收集提示。。。但如有必要,您可以将该值减少到几个小时,正如链接文档中所暗示的那样

看看这个话题