hbase 更改表名,hbase更改表
因为hbase中没有rename命令,所以更改表名比较复杂。重命名主要通过hbase的快照功能。
1.停止表继续插入
hbase shell>disable 'tableName'
2。制作快照
hbase shell> snapshot 'tableName', 'tableSnapshot'
3.克隆快照为新的名字
hbase shell> clone_snapshot 'tableSnapshot', 'newTableName'
4.删除快照
hbase shell> delete_snapshot 'tableSnapshot'
5.删除原来表
hbase shell> drop 'tableName'
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。