无法删除行键 [英] cannot delete row key

查看:153
本文介绍了无法删除行键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Cassandra中删除行键时遇到问题。每当我删除Row Key,该RowKey包含的所有列都将被删除,但RowKey本身不会被删除。任何人都可以告诉我如何删除一个rowkey,一旦它被插入columnfamily。

I'm having an issue while deleting row key in Cassandra. Whenever I delete Row Key all the columns contained by that RowKey are deleted but RowKey itself is not deleted. Can anybody tell me how to remove a rowkey, once it is inserted in columnfamily.

我期待着通过thrift客户端。

I'm looking forward to do that via thrift client.

推荐答案

这是分布式删除在Cassandra中工作的副作用。从分布式删除的Cassandra wiki页面:

This is a side effect of how distributed deletes work in Cassandra. From the Cassandra wiki page on distributed deletes:


[A]删除操作不能只是擦除立即删除的数据的所有痕迹:如果我们做了,并且副本没有收到删除操作,当它再次变得可用时,它将处理副本没有收到删除,因为错过了一个写入更新,并修复它们!因此,Cassandra不会删除删除的数据,而是使用一个称为墓碑的特殊值替换它。然后可以将墓碑传播到错过最初删除请求的副本。

[A] delete operation can't just wipe out all traces of the data being removed immediately: if we did, and a replica did not receive the delete operation, when it becomes available again it will treat the replicas that did receive the delete as having missed a write update, and repair them! So, instead of wiping out data on delete, Cassandra replaces it with a special value called a tombstone. The tombstone can then be propagated to replicas that missed the initial remove request.

另请参阅常见问题中的此问题: a href =http://wiki.apache.org/cassandra/FAQ#range_ghosts>为什么删除的键在范围扫描期间显示?

Also take a look at this question on the FAQ: Why do deleted keys show up during range scans?

这篇关于无法删除行键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆