You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2012/06/14 08:29:42 UTC

[jira] [Comment Edited] (HBASE-6205) Support an option to keep data of dropped table for some time

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

Ted Yu edited comment on HBASE-6205 at 6/14/12 6:28 AM:
--------------------------------------------------------

Nice feature.

Shall we consider the possibility that there may be more than one attempt to delete the same table ? This could be due to e.g. region server failure, etc.
In that case we would have more than one directory for the table, each with different timestamp prefix.
It would be nice for this feature to group regions for the same table under one parent directory.

Further, trash is able to hold more than one table. Can we name related classes Trash instead of TrashTable ?

The regions in trash would occupy disk space. It would be nice to show on master UI how much space is currently consumed by trash, what tables are in trash.

It would also be nice to prompt user if he/she is creating a table with the same name as one of the tables in trash.

The above can be done in follow-up JIRAs. However we should prepare for enhancement from the beginning.

Please put patch on review board when you think it has paved the way for future enhancement.
                
      was (Author: yuzhihong@gmail.com):
    Nice feature.

Shall we consider the possibility that there may be more than one attempt to delete the same table ? This could be due to e.g. region server failure, etc.
In that case we would have more than one directory for the table, each with different timestamp prefix.
It would be nice for this feature to group regions for the same table under one parent directory.

Further, trash is able to hold more than one tables. Can we name related classes Trash instead of TrashTable ?

The regions in trash would occupy disk space. It would be nice to show on master UI how much space is currently consumed by trash, what tables are in trash.

It would also be nice to prompt user if he/she is creating a table with the same name as one of the tables in trash.

The above can be done in follow-up JIRAs. However we should prepare for enhancement from the beginning.

Please put patch on review board when you think it has paved the way for future enhancement.
                  
> 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
>
>
> 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 TrashTableCleaner 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