Hector:如何删除行内的复合列

时间:2012-05-30 18:57:15

标签: cassandra hector

我在列族标签

上有复合列
RowKey: A
=> (column=B:C, value=432b442b492b4b2b552b582b592b7465787433, timestamp=1338402672044003)
=> (column=C:D, value=442b492b4b2b552b582b592b7465787433, timestamp=1338402672044004)
=> (column=E:T, value=492b582b592b5a2b5a5a2b5a5a5a2b7465787434, timestamp=1338402672049002)

如何在行A,列(C:D)中删除例如

似乎是:

Mutator<String> mutator = HFactory.createMutator(ks, se);
mutator.addDeletion(..

只有2个参数行和CF

1 个答案:

答案 0 :(得分:0)

对于感兴趣的人来说,就像他们的创作一样简单;

CompositeSerializer ce = new CompositeSerializer();
Composite c = new Composite();
c.add(0, "John");
c.add(1, "Connor");
mutator.addDeletion("key", "MyCF", c, ce);