Deleting Columns in HBase

2019-06-07 00:48发布

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?

1条回答
该账号已被封号
2楼-- · 2019-06-07 00:59

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

查看更多
登录 后发表回答