Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Table is neither enables nor disabled in HBase

Tags:

hbase

I am facing a weird problem. I was accessing my HBase tables through an API. Midway during execution I got a RegionNotServing for my table 'x'. But My HRegionServers were working fine.

When I tried to list the tables from HBase Shell I could not find my table 'x'. When I tried to Disable my table 'x' it threw a TableNotEnabledException and when I tried to Enable my table 'x' it threw me a TableNotDisabledException.

Attached is the Exeption I got:

hbase(main):002:0> disable 'x'

ERROR: org.apache.hadoop.hbase.TableNotEnabledException: org.apache.hadoop.hbase.TableNotEnabledException: x
        at org.apache.hadoop.hbase.master.handler.DisableTableHandler.<init>(DisableTableHandler.java:75)
        at org.apache.hadoop.hbase.master.HMaster.disableTable(HMaster.java:1154)
        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.WritableRpcEngine$Server.call(WritableRpcEngine.java:364)
        at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1336)

Here is some help for this command:
Start disable of named table: e.g. "hbase> disable 't1'"


hbase(main):003:0> enable 'x'

ERROR: org.apache.hadoop.hbase.TableNotDisabledException: org.apache.hadoop.hbase.TableNotDisabledException: x
        at org.apache.hadoop.hbase.master.handler.EnableTableHandler.<init>(EnableTableHandler.java:74)
        at org.apache.hadoop.hbase.master.HMaster.enableTable(HMaster.java:1142)
        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.WritableRpcEngine$Server.call(WritableRpcEngine.java:364)
        at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1336)

Here is some help for this command:
Start enable of named table: e.g. "hbase> enable 't1'"


hbase(main):004:0> 
like image 906
Jay Avatar asked Jan 28 '13 07:01

Jay


People also ask

How do I know if a HBase table is disabled?

is_disabled. This command is used to find whether a table is disabled. Its syntax is as follows. The following example verifies whether the table named emp is disabled.

Does HBase have tables?

An HBase table is a multi-dimensional map comprised of one or more columns and rows of data. You specify the complete set of column families when you create an HBase table. An HBase cell is comprised of a row (column family, column qualifier, column value) and a timestamp.

What is the command is used to list of tables available in HBase?

You have a method called listTables() in the class HBaseAdmin to get the list of all the tables in HBase.


1 Answers

the follow steps was useful to me:

  1. enter into hbase shell
  2. get 'hbase:meta', '<AFFECTED_TABLE_NAME>', 'table:state'
  3. Notice the above "value". The value should either be \x08\x00 (Enabled) or \x08\x01 (Disabled)
  4. put 'hbase:meta','<AFFECTED_TABLE_NAME>','table:state',"\b\0" to make the table enable
like image 50
hanbd Avatar answered Oct 12 '22 20:10

hanbd