Reputation: 551
I have following query about hbase snapshot:
If I execute below statement in give order :
hbase> snapshot 'NS1:table1', 'snap_table1'
hbase> disable 'NS1:table1'
hbase> drop 'NS1:table1'
hbase> clone_snapshot 'snap_table1','NS1:table1'`
In this case, Can "NS1:table1"
still holds the data from the snapshot even after major compaction ?
Thank you!
Upvotes: 2
Views: 972
Reputation: 469
snapshot 'NS1:table1', 'snap_table1' : it will create the snapshot. snapshot data will not take additional space till the hfiles it's referencing is changed due to some reasons(major/minor-compactions). if hfile is changed or table is deleted, it will copy the hfiles to snapshot path.
disable 'NS1:table1' : disable the table. before deleting the table you need to disable it first.
drop 'NS1:table1' : all table data and associated hfds folders will be removed. the referenced hfiles of the snapshot is moved to snapshot path.
clone_snapshot 'snap_table1','NS1:table1' : it will take data from snapshot path and create a table with same data as of the old table(data will be availbale till the snapshhot taken time).
Can "NS1:table1" still holds the data from the snapshot even after major compaction : data will be there even after major compacted.
This answer is based on my experience if any mistakes correct me :)
Thanks & Regards Rahul
Upvotes: 4