Deleting Columns in HBase

不羁的心 提交于 2019-12-10 11:53:09

问题


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:


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



来源:https://stackoverflow.com/questions/18763982/deleting-columns-in-hbase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!