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

Hudson commented on HBASE-8574:
-------------------------------

Integrated in HBase-TRUNK #4128 (See 
[https://builds.apache.org/job/HBase-TRUNK/4128/])
    HBASE-8574 Add how to rename a table in th docbook (Revision 1483998)

     Result = SUCCESS
stack : 
Files : 
* /hbase/trunk/src/main/docbkx/ops_mgt.xml

                
> Add how to rename a table in the docbook 
> -----------------------------------------
>
>                 Key: HBASE-8574
>                 URL: https://issues.apache.org/jira/browse/HBASE-8574
>             Project: HBase
>          Issue Type: Task
>          Components: documentation
>    Affects Versions: 0.94.7, 0.95.0
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>             Fix For: 0.98.0, 0.94.8, 0.95.1
>
>
> Add a section "how to rename a table" in the doc book.
> The current easy solution without adding extra code in 94/95 is to use 
> snapshots
> {code}
> hbase shell> disable 'tableName'
> hbase shell> snapshot 'tableName', 'tableSnapshot'
> hbase shell> clone 'tableSnapshot', 'newTableName'
> hbase shell> delete_snapshot 'tableSnapshot'
> {code}
> {code}
> void rename(HBaseAdmin admin, String oldTableName, String newTableName) {
>     String snapshotName = randomName();
>     admin.snapshot(snapshotName, oldTableName);
>     admin.cloneSnapshot(snapshotName, newTableName);
>     admin.deleteSnapshot(snapshotName);
>     admin.deleteTable(oldTableName)
> }
> {code}

--
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