Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
Description
When table is deleted, only Hfiles are moved to archives dir, table and region infos are deleted immediately. So it's very difficult to recover tables which are deleted by mistakes.
I think if we can introduce an table trash dir in HDFS. When the table is deleted, the entire table dir is moved to trash dir. And after an configurable ttl, the dir is deleted actually. This can be done by HMaster.
If we want to recover the deleted table, we can use a tool which moves table dir out of trash and recovery the meta data of the table. There are many problems the recover tool will encountered eg, parent and daughter regions are all in the table dir. But I think this feature is useful to handle some special cases.
Discussions are welcomed.