如何在hbase表中删除一个家族的所有数据? [英] How do I delete all data for a family in hbase table?
问题描述
最简单的方法似乎是从文件系统中删除与该系列相关的文件(位于../{table_name}/{some_hash}/{family_name}/下)。
这样做是否有任何副作用,我们应该知道?
如果有的话,有没有更安全的方法可以做到这一点? 解决方案
更安全的方法是 deleteColumn 并完全删除系列,然后使用 addColumn 。请注意,在进行这些更改之前,您需要禁用表格
We have an HBase table with multiple families, and we need to delete all data for a certain family, but leave the rest untouched. We only need to delete the data, and leave the family there, as we will be repopulating the table with new data for that family. The simplest way seems to be to delete the files associated with that family from the file system (found under ../{table_name}/{some_hash}/{family_name}/). Are there any side effects to doing this that we should be aware of? If there are, are there any safer, easy ways to do this?
The safer way would be to deleteColumn and remove the family completely and then re-add it with addColumn. Note that you need to disable the table before you make these changes
这篇关于如何在hbase表中删除一个家族的所有数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!