Cassandra nodetool
有一个名为 cleanup
的命令:
cleanup [keyspace][cf_name]
Triggers the immediate cleanup of keys no longer belonging to this node. This has roughly the same effect on a node that a major compaction does in terms of a temporary increase in disk space usage and an increase in disk I/O. Optionally takes a list of column family names.
我的问题是:
- 什么时候节点会拥有不属于它的 key ?
- 我应该什么时候进行清理?
- 我应该定期进行清理(例如每周一次)吗?
最佳答案
When will a node having keys not belonging to it?
当您向集群添加新节点、降低复制因子或移动 token 时。
When should I issue a cleanup?
经过上述操作之一后,如果您需要节省磁盘空间。延迟运行它没有什么害处 - 会影响性能,唯一的原因是节省磁盘空间。
Should I do cleanup regularly (e.g. once per week)?
否,仅当您在执行上述操作之一后需要节省空间时。
关于cassandra - 我应该什么时候在 Cassandra 中运行清理?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18262519/