关于 hbase Table already exists: xxx (表)问题。

本文介绍在HBase中创建和删除表时遇到的常见问题及解决方法,包括表不存在和表已存在错误,以及如何通过ZooKeeper客户端查看和删除僵尸表。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题如下:
hbase(main):004:0> exists ‘test’

Table test does not exist

0 row(s) in 0.0980 seconds

hbase(main):005:0> create ‘test’,‘cf’

ERROR: Table already exists: test!

Here is some help for this command:

Create table; pass table name, a dictionary of specifications per

column family, and optionally a dictionary of table configuration.

Dictionaries are described below in the GENERAL NOTES section.

Examples:

hbase> create ‘t1’, {NAME => ‘f1’, VERSIONS => 5}

hbase> create ‘t1’, {NAME => ‘f1’}, {NAME => ‘f2’}, {NAME => ‘f3’}

hbase> # The above in shorthand would be the following:

hbase> create ‘t1’, ‘f1’, ‘f2’, ‘f3’

hbase> create ‘t1’, {NAME => ‘f1’, VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}

hbase> create ‘t1’, ‘f1’, {SPLITS => [‘10’, ‘20’, ‘30’, ‘40’]}

hbase> create ‘t1’, ‘f1’, {SPLITS_FILE => ‘splits.txt’}

hbase> # Optionally pre-split the table into NUMREGIONS, using

hbase> # SPLITALGO (“HexStringSplit”, “UniformSplit” or classname)

hbase> create ‘t1’, ‘f1’, {NUMREGIONS => 15, SPLITALGO => ‘HexStringSplit’

解决方法:

通过$hbase zkcli命令进入zookeeper client模式
在zk client模式下输入ls /hbase/table命令看到zombie table
然后使用rm/hbase/table/TABLE_NAME命令删除zombie table,重启hbase即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值