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

Matteo Bertozzi commented on HBASE-7365:
----------------------------------------

{quote}
In below... the archive tool will be able to make sense of the deleted table?
{quote}
Not sure what you mean here, if is something like "can you move that in the 
archiver?"
or is more like "does it works?"

Basically the archiver just takes the specified region folder in the tabledir 
and
move it in the rootdir/.archive (not sure why the fancy 2 path arg for tabledir 
and regiondir)
In reality the move is done file by file... but this is another story...

{quote}
Why not call checkTempDir rather than do this?
{quote}
checkTempDir() does another job, that is more like initTempDir() that means 
create or cleaning it if exists.
In this case we don't want to clean it. What do you think? keep the code as is? 
rename the checkTempDir() in initTempDir() and create the checkTempDir() that 
only creates the directory?
                
> Safer table creation and deletion using .tmp dir
> ------------------------------------------------
>
>                 Key: HBASE-7365
>                 URL: https://issues.apache.org/jira/browse/HBASE-7365
>             Project: HBase
>          Issue Type: Improvement
>          Components: master
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>             Fix For: 0.96.0
>
>         Attachments: HBASE-7365-v0.patch
>
>
> Currently tables are created in the root directory, and the removal works on 
> the root directory.
> Change the code to use a /hbase/.tmp directory to make the creation and 
> removal a bit safer
> Table Creation steps
>  * Create the table descriptor (table folder, in /hbase/.tmp/)
>  * Create the table regions (always in temp)
>  * Move the table from temp to the root folder
>  * Add the regions to meta
>  * Trigger assignment
>  * Set enable flag in ZooKeeper
> Table Deletion steps
>  * Wait for regions in transition
>  * Remove regions from meta (use bulk delete)
>  * Move the table in /hbase/.tmp
>  * Remove the table from the descriptor cache
>  * Remove table from zookeeper
>  * Archive the table
> The main changes in the current code are:
>  * Writing to /hbase/.tmp and then rename
>  * using bulk delete in DeletionTableHandler

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to