1. 程式人生 > >關於 hbase Table already exists: xxx (表)問題。

關於 hbase Table already exists: xxx (表)問題。

問題如下: 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 然後使用rmr /hbase/table/TABLE_NAME命令刪除zombie table,重啟hbase即可