Reputation: 2083
I am new to Hbase and learning it day by day. What happens to data when a Hbase table is dropped ? Are the data and schema lost or is there a scenario like Hive external table where the schema is lost and the data is preserved. Do Hbase has the same concept of Hive as External table and managed table.
Upvotes: 1
Views: 1468
Reputation: 11609
For a simple observation, HBase table data consists of two parts:
HBase tables can share same physical blocks, for example you can make a snapshot of table A and restore it into table B, so both table will refer to the same data. If you delete a row in table A, it will only 'delete' meta info for table A, but not delete physical data for this row, because it is still referenced by table B.
So, answering your question, when you drop table you first delete meta info. If physical data is not referenced by any other table or snapshot it will be deleted too.
Upvotes: 4