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

Enis Soztutar commented on HBASE-6205:
--------------------------------------

Considering this, HBASE-5547, and snapshots, it seems that we can decouple file 
management, and region-file association. We can build a very lightweight file 
manager, and remove all file deletion code from RS code. 

As in the bigtable design, we can keep the current hfile's (and WAL's) of the 
regions in META, and RS flushes, or rolls the log, adds the file reference at 
META. Then for a snapshot or a backup, we just need a point-in-time snapshot of 
the META table. A master thread can periodically scan the META, and META 
snapshots and the hdfs directories, and delete the files with 0 reference based 
on a policy. And deleting the table will just take a META snapshot for the 
table, and delete the META entries afterwards. This META snapshot will be kept 
for a while (similar to the normal snapshot retention). WDYT, how crazy is 
this? 
                
> Support an option to keep data of dropped table for some time
> -------------------------------------------------------------
>
>                 Key: HBASE-6205
>                 URL: https://issues.apache.org/jira/browse/HBASE-6205
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.94.0, 0.96.0
>            Reporter: chunhui shen
>            Assignee: chunhui shen
>             Fix For: 0.96.0
>
>         Attachments: HBASE-6205.patch, HBASE-6205v2.patch, 
> HBASE-6205v3.patch, HBASE-6205v4.patch, HBASE-6205v5.patch
>
>
> User may drop table accidentally because of error code or other uncertain 
> reasons.
> Unfortunately, it happens in our environment because one user make a mistake 
> between production cluster and testing cluster.
> So, I just give a suggestion, do we need to support an option to keep data of 
> dropped table for some time, e.g. 1 day
> In the patch:
> We make a new dir named .trashtables in the rood dir.
> In the DeleteTableHandler, we move files in dropped table's dir to trash 
> table dir instead of deleting them directly.
> And Create new class TrashCleaner which will clean dropped tables if it is 
> time out with a period check.
> Default keep time for dropped tables is 1 day, and check period is 1 hour.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to