ITPub博客

首页 > 应用开发 > IT综合 > About compation

About compation

原创 IT综合 作者:oxoxooxx 时间:2011-08-17 17:44:28 0 删除 编辑
minor compaction vs. major compaction
min compaction threshold vs. max compaction threshold

问题一、
minor compaction vs. major compaction
1.major compaction 只能手动的通过nodetool触发,对整个column family所有的sstable进行compact;minor compcation通过配置参数min compaction threshold 和max compaction threashold达到条件后触发
2.在0.7-beta2版本之后,non-major compation 在比较bloom filter确认tombstone标示的row不存在于其它sstable中也可以将其删除。
因为minor compaction会根据min compaction threshold 和max compaction threashold对文件进行合并,并不一定会对CF所有的SSTABLE合并,所以不保证会删除所有的tombstone.

<!--
(0.7-beta2 --add by wm)
* remove tombstones during non-major compactions when bloom filter //如果在其他节点还有呢???
verifies that row does not exist in other sstables (CASSANDRA-1074)
-->

问题二、
min compaction threshold vs. max compaction threshold

1.compaction threshold 有两种设置方式
一种是使用JMX和nodetool设置,这个设置方式不是持久的,下次启动后失效;并且只对当前节点生效,不会扩散到集群中的其它节点。
#nodetool -h localhost setcompactionthreshold Keyspace1 Standard1 0 0
另一种方式是使用cli,这种配置是持久的,而且会扩展到其它节点。
cli>update column family X with min_compaction_threshold=Y and max_compaction_threshold=X

2.
- min_compaction_threshold: Avoid minor compactions of less than this number of sstable files
- max_compaction_threshold: Compact no more than this number of sstable files at once[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23937368/viewspace-1053965/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: topic links
请登录后发表评论 登录
全部评论
  • 博文量
    178
  • 访问量
    843646