如何在 HBase 中重命名 Table?
How Do You Rename a Table in HBase?
我正在尝试重命名 HBase 中的 table,但 shell 中的帮助没有 rename
命令。 move
、mv
和其他常见的罪魁祸首似乎也不是。
要在 HBase 中重命名一个 table,显然你必须使用快照。因此,您拍摄了 table 的快照,然后将其克隆为不同的名称。
在 HBase 中 shell:
disable 'tableName'
snapshot 'tableName', 'tableSnapshot'
clone_snapshot 'tableSnapshot', 'newTableName'
delete_snapshot 'tableSnapshot'
drop 'tableName'
来源
我正在尝试重命名 HBase 中的 table,但 shell 中的帮助没有 rename
命令。 move
、mv
和其他常见的罪魁祸首似乎也不是。
要在 HBase 中重命名一个 table,显然你必须使用快照。因此,您拍摄了 table 的快照,然后将其克隆为不同的名称。
在 HBase 中 shell:
disable 'tableName'
snapshot 'tableName', 'tableSnapshot'
clone_snapshot 'tableSnapshot', 'newTableName'
delete_snapshot 'tableSnapshot'
drop 'tableName'
来源