hbase 表重命名
hbase shell> disable 'tableName' hbase shell> snapshot 'tableName', 'tableSnapshot' hbase shell> clone_snapshot 'tableSnapshot', 'newTableName' hbase shell> delete_snapshot 'tableSnapshot' hbase shell> drop 'tableName'
void rename(HBaseAdmin admin, String oldTableName, String newTableName) { String snapshotName = randomName(); admin.disableTable(oldTableName); admin.snapshot(snapshotName, oldTableName); admin.cloneSnapshot(snapshotName, newTableName); admin.deleteSnapshot(snapshotName); admin.deleteTable(oldTableName); }
相关推荐
晨曦之星 2020-08-14
lwb 2020-07-26
eternityzzy 2020-07-19
大而话之BigData 2020-06-16
ITwangnengjie 2020-06-14
gengwx00 2020-06-11
大而话之BigData 2020-06-10
鲸鱼写程序 2020-06-08
needyit 2020-06-04
strongyoung 2020-06-04
WeiHHH 2020-05-30
ITwangnengjie 2020-05-09
gengwx00 2020-05-08
gengwx00 2020-05-09
大而话之BigData 2020-05-06
Buerzhu 2020-05-01
gengwx00 2020-04-30