hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-10535) Table trash to recover table deleted by mistake
Date Sun, 16 Feb 2014 20:36:21 GMT

    [ https://issues.apache.org/jira/browse/HBASE-10535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13902821#comment-13902821
] 

Andrew Purtell edited comment on HBASE-10535 at 2/16/14 8:34 PM:
-----------------------------------------------------------------

Providing an option to, upon deletion command, disable the table and then move its metadata
to a namespace from which tables are automatically dropped after some interval seems reasonable.
The only wrinkle is finding somewhere to record the original namespace name to support a restore
command, and introducing that restore command. 

This would address Enis' point because there would not be any new directories introduced at
the HDFS level. The table goes into an effective inactive state with all HFiles in place,
and at some point the normal drop and HFile archival step happens as before. 


was (Author: apurtell):
Providing an option to, upon deletion command, disable the table and then move its metadata
to a namespace from which tables are automatically dropped after some interval seems reasonable.
The only wrinkle is finding somewhere to record the original namespace name to support a restore
command, and introducing that restore command. 

> Table trash to recover table deleted by mistake
> -----------------------------------------------
>
>                 Key: HBASE-10535
>                 URL: https://issues.apache.org/jira/browse/HBASE-10535
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Liu Shaohui
>            Priority: Minor
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message