hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject Re: How to delete an "non-existent" table?
Date Tue, 27 Jul 2010 22:51:14 GMT
Check in the .META. table, there must be some OFFLINE regions. Delete
those rows like you would delete rows from any table.

If the data is still on HDFS, you could also run bin/add_table.rb

J-D

On Tue, Jul 27, 2010 at 3:49 PM, Steve Kuo <kuosenhao@gmail.com> wrote:
> My HBase cluster was in a bad state with all regionservers terminated.
> After waiting for bin/stop-hbase.sh to shutdown for a long time, I hard
> killed HMaster.  When I restarted hbase, I found table_c did not show up
> under 'list' but I could not re-create it.
>
> What is the best way to rectify this situation?  It's ok to wipe out all
> tables and start over if necessary.
>
> Thanks in advance.
>
> HBase Shell; enter 'help<RETURN>' for list of supported commands.
> Version: 0.20.5, r956266, Sat Jun 19 12:25:12 PDT 2010
> hbase(main):001:0> list
> table_a
>
> table_b
>
> 2 row(s) in 0.0840 seconds
> hbase(main):002:0> create 'table_c', {NAME => 'data', COMPRESSION => 'lzo',
> VERSIONS => 1}
> NativeException: org.apache.hadoop.hbase.TableExistsException:
> org.apache.hadoop.hbase.TableExistsException: table_c
>    at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:798)
>    at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:762)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:657)
>    at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:915)
>
>
> hbase(main):003:0> exists 'table_c'
> false
>
> 1 row(s) in 0.0420 seconds
>

Mime
View raw message