Table is neither enables nor disabled in HBase
Asked Answered
G

5

10

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> 
Gnosticize answered 28/1, 2013 at 7:58 Comment(0)
D
18

I had a similar issue before. The problem was because Zookeeper was holding the table. So I deleted the table manually by following the below steps

  1. Enter into hbase zookeper client mode using hbase zkcli command
  2. Delete the table using the command delete /hbase/table/x
Dominate answered 28/1, 2013 at 8:12 Comment(3)
Hi!! I found that my table x was held by my zookeeper and I deleted the table using the command above!! but still the problem persists!!Gnosticize
U can clean the meta region using the following command : hbase hbck -fixMeta -fixAssignments. Guess it should work.Dominate
I also had a situation where delete /hbase/table/x and restarting the cluster didn't do it; but if I ran vishnu's suggestion after that, it did the trick.Sulphonate
N
4

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
Nickeliferous answered 11/3, 2020 at 10:56 Comment(0)
B
1


I had faced similar issue on Production. The problem was specific Hbase Table Meta corrupted. So I deleted the table manually from zookeeper using below

1. Enter into hbase zookeper client mode using hbase zkcli command

2. Delete the table using the command delete /hbase/table/x

3. Delete the table using the command delete /hbase/table-lock/x


After following above command, restarted Hbase but issue still appeared so I deleted region of Hbase Table from Hbase system Table using below

1. Enter into hbase using hbase shell command

2. Delete the Table Regions which is stuck in transition state using below command

deleteall 'hbase:meta','XXX,Table_region.'

Banjermasin answered 22/11, 2019 at 2:37 Comment(0)
K
0

I just had this issue and it turned out that a region server was up but not able to be reached for some reason. Rather than try and debug this, I restarted the region server and this fixed everything.

Sequence of events:

  1. Something happened to make the region server get into a bad state where it was reported up but unreachable
  2. Tried to disable a table while that region server was in the bad state (unbeknownst to me at the time). Got an RPC timeout error
  3. Tried to drop the table, got error "table is not enabled or disabled". HBase UI was reporting 'unknown' compaction status for that table
  4. Noticed a failed bulk load job that said it could not reach the specific region server
  5. Restarted region server
  6. HBase UI now reported table as 'none' for compaction, enables/disables/drops worked in shell
Koziara answered 12/6, 2015 at 15:16 Comment(0)
G
0

This sequence of act is helped me:

  • $HBASE_HOME/bin/hbase shell - Open hbase shell
  • hbase(main):003:0> list - Put list command to make sure the table exists
  • hbase(main):004:0> enable "table name" - Enable the table

That's all! Now the table can be dropped from phoenix.

Gilbye answered 13/7, 2021 at 4:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.