删除HBase中的列 [英] Deleting Columns in HBase

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

问题描述

在HBase中,调用DeleteColumn()方法,即基本上对列族进行模式更改或删除列族会导致HBase Cluster停机?

解决方案

上的deleteColumn方法HBase的删除突变删除特定行中的特定列,这不是模式更改,因为HBase不保留每行的列的模式级知识(并且每行可以有不同的数目和类型列 - 认为它是一个人口稀少的矩阵)。这个对象上的deleteFamily也是如此。



不会出现集群停机时间(并且HBase实际上不会删除数据,直到该区域的下一个主要压缩)



如果你想从整个表中删除一个列族,你可以通过HBaseAdmin来完成,并且使用名称不那么恰当的 deleteColumn 方法(或者外壳与 alter'table_name',{NAME =>'family_name',METHOD =>'delete'} ) - 在这种情况下,表需要先禁用而HBase不会遭受宕机,具体的表格将会是

In HBase, calling DeleteColumn() method i.e., essentially a schema change to a column family or deleting column families will result in downtime of HBase Cluster?

解决方案

The deleteColumn method on a Delete mutation of HBase deletes specific column(s) from a specific row this is not a schema change since HBase does not retain a schema-level knowledge of columns of each row (and each row can have a different number and types of columns - think about it as a thinly populated matrix). The same is true for deleteFamily on this object.

There won't be a cluster downtime for this (and HBase will not actually delete the data until the next major compaction of the region)

If you want to drop a column family from the whole table you can do that via HBaseAdmin with the not so aptly named deleteColumn method (or the shell with alter 'table_name', {NAME => 'family_name', METHOD => 'delete'}) - in this case the table needs to be disabled first so while HBase won't suffer a downtime, the specific table will

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

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