因为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'

即可查看到newTableName表

相关文章:

  • 2021-06-17
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-12
  • 2022-01-07
  • 2021-11-06
  • 2021-10-06
  • 2022-12-23
  • 2022-01-19
  • 2021-11-17
相关资源
相似解决方案