我目前正致力于在Cassandra上实现存储算法的想法, 为了这个想法工作, 除了每个单元格的时间戳之外,我还需要存储一些每单元格元数据。
我的问题是, 在代码库中Cassandra处理每个单元格时间戳的位置? 我已经浏览了写入路径,似乎无法找到它。
答案 0 :(得分:1)
您可能想从这里开始:
Cell.java:
32 /**
33 * A cell is our atomic unit for a single value of a single column.
34 * <p>
35 * A cell always holds at least a timestamp that gives us how the cell reconcile. We then
36 * have 3 main types of cells:
37 * 1) live regular cells: those will also have a value and, if for a complex column, a path.
38 * 2) expiring cells: on top of regular cells, those have a ttl and a local deletion time (when they are expired).
39 * 3) tombstone cells: those won't have value, but they have a local deletion time (when the tombstone was created).
40 */
AbstractCell.java(继承Cell.java):
在这里
NativeCell.java(继承AbstractCell.java):
但是,如果您想将Cassandra用于存储解决方案,请明确存储时间戳和元数据,不要使用cassandras内部的单元格元数据。