HBase create a new table hint of the old table already exists after NameNode format: table already exists

1. problem:

After formatting the NameNode, OpenTSDB table installed on the cluster (the present hbase) are not, re-run pre-created table OpenTSDB step error indicator table already exists

2. Cause:

After reformatting hadoop, no data on the HDFS, in the new table has suggested hbase Table already exists. Because previously I built a table of the same name, although things related to HDFS and Hbase have been deleted. But zookeeper hbase save the address table, the data is accessed by the address zookeeper Go on hdfs, which is hbase physical storage structure of the decision. So you need to Zookeeper in the corresponding table is also deleted.

3. Solution:

Run Zookeeper client zkCli.sh:

[root@hadoop201 hbase-1.3.1]# cd /opt/module/zookeeper-3.4.10/bin
[root@hadoop201 bin]# ./zkCli.sh

List all the tables hbase:

[zk: localhost:2181(CONNECTED) 0] ls /hbase/table
[hbase:meta, tsdb-tree, tsdb, hbase:namespace, tsdb-uid, tsdb-meta]

Delete the corresponding table:

[zk: localhost:2181(CONNECTED) 1] rmr /hbase/table/hbase:meta
[zk: localhost:2181(CONNECTED) 3] rmr /hbase/table/tsdb-tree 
[zk: localhost:2181(CONNECTED) 5] rmr /hbase/table/tsdb     
[zk: localhost:2181(CONNECTED) 6] rmr /hbase/table/hbase:namespace
[zk: localhost:2181(CONNECTED) 7] rmr /hbase/table/tsdb-uid
[zk: localhost:2181(CONNECTED) 9] rmr /hbase/table/tsdb-meta
[zk: localhost:2181(CONNECTED) 10] quit

Re-create success.

 

reference

https://blog.csdn.net/s243471087/article/details/82854374

 

Guess you like

Origin www.cnblogs.com/MWCloud/p/11449320.html