Cassandra时间戳8字节
我知道时间戳是为了最终的一致性,但在某些情况下,每行都需要一致性,而不是每个单元格。在这种情况下,每个单元 8 字节只是浪费磁盘和内存。
有什么方法可以消除单元格的时间戳吗?
I understand that time stamp is there for eventual consistency but there are some cases where consistency is required per row not for each cell. In this case 8bytes per cell is just wastage of both disk and memory.
Is there any way to get rid of time stamp for cells?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,因为每个单元的时间戳是 Cassandra 无模式的固有结果。您的应用程序可能一次只能写入一整行,但 Cassandra 不知道这一点。它必须允许有人稍后出现并覆盖您所在行中的一列的可能性。该列需要有自己的时间戳。
压缩(Cassandra 1.0 中即将推出)应该会减少重复时间戳的开销。请参阅https://issues.apache.org/jira/browse/CASSANDRA-47。
No, because the per-cell timestamp is an inherent consequence of Cassandra being schema-less. Your application might only write a complete row at a time, but Cassandra doesn't know that. It has to allow the possibility that someone might come along later and overwrite one of the columns in your row. That column would then need its own timestamp.
Compression (forthcoming in Cassandra 1.0) should reduce the overhead of repeated timestamps. See https://issues.apache.org/jira/browse/CASSANDRA-47.