如何重命名HBase中的表? [英] How Do You Rename a Table in HBase?
本文介绍了如何重命名HBase中的表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在HBase中重命名表,但shell中的帮助没有 rename
命令。 move ,
mv
以及其他常见的罪魁祸首似乎都不是。
在HBase shell中:
禁用'tableName'
snapshot'tableName','tableSnapshot'
clone_snapshot'tableSnapshot','newTableName'
delete_snapshot'tableSnapshot'
drop'tableName'
来源 $ b
http://hbase.apache.org/book.html#table.rename
I'm trying to rename a table in HBase but the help in the shell doesn't have a rename
command. move
, mv
and other common culprits don't appear to be it, either.
解决方案
To rename a table in HBase, apparently you have to use snapshots. So, you take a snapshot of the table and then clone it as a different name.
In the HBase shell:
disable 'tableName'
snapshot 'tableName', 'tableSnapshot'
clone_snapshot 'tableSnapshot', 'newTableName'
delete_snapshot 'tableSnapshot'
drop 'tableName'
SOURCE
http://hbase.apache.org/book.html#table.rename
这篇关于如何重命名HBase中的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文