Created 03-02-2019 12:35 PM
This is just a knowledge sharing article. I had faced this issue in production and took me a day to resolve it.
The workaround that I'm sharing will help you in getting your table back online in "Enabled" without deleting Zookeeper Hbase table znode or any data as a matter of fact..
Here are steps to resolve it.
1. Run a "get" command against hbase:meta for the affected table
hbase(main):003:0> get 'hbase:meta', '<AFFECTED_TABLE_NAME>', 'table:state' COLUMN CELL table:state timestamp=1551456805377, value=\x08\x02
2. Notice the above "value". Its pointing to \x08\x02 which is wrong. The value should either be \x08\x00 (Enabled) or \x08\x01 (Disabled)
3. Edit the value manually.
hbase(main):003:0> put 'hbase:meta','<AFFECTED_TABLE_NAME>','table:state',"\b\0"
Click here for more information on "Control Characters"
4. Verify the same.
hbase(main):003:0> get 'hbase:meta', '<AFFECTED_TABLE_NAME>', 'table:state'
The "value" now should be \x08\x00
Post this, again run disable <table_name> and enable <table_name> just for the love of sanity check in hbase shell and you are done with the issue.
Created on 03-16-2021 12:41 AM - last edited on 03-16-2021 01:39 AM by VidyaSargur
Hello @sheshk11
Thanks for sharing your knowledge (Knowledge Article) on managing the DISABLING Table. As @tencentemr mentioned, It has been helpful. Few other details I wish to add:
1. Using the Link [1] HBCK setTableState to perform the same on HBase v2.x. The advantage of using the same is to ensure the manual intervention is avoided to avoid any unintended HBase Metadata manipulation.
2. In certain cases, the Regions belonging to the Table would be in Transition as well. If we are Disabling the Table, It's best to review the RegionState for the Table as well. Link [1] HBCK setRegionState can assist here.
As the Post is a KA, I shall mark the same as Resolved. Thank You for posting the same for assisting fellow Community Members.
- Smarak
[1] https://github.com/apache/hbase-operator-tools/tree/master/hbase-hbck2
Created 03-15-2021 08:58 AM
thanx a lot,this really helpful. it works.
Created on 03-16-2021 12:41 AM - last edited on 03-16-2021 01:39 AM by VidyaSargur
Hello @sheshk11
Thanks for sharing your knowledge (Knowledge Article) on managing the DISABLING Table. As @tencentemr mentioned, It has been helpful. Few other details I wish to add:
1. Using the Link [1] HBCK setTableState to perform the same on HBase v2.x. The advantage of using the same is to ensure the manual intervention is avoided to avoid any unintended HBase Metadata manipulation.
2. In certain cases, the Regions belonging to the Table would be in Transition as well. If we are Disabling the Table, It's best to review the RegionState for the Table as well. Link [1] HBCK setRegionState can assist here.
As the Post is a KA, I shall mark the same as Resolved. Thank You for posting the same for assisting fellow Community Members.
- Smarak
[1] https://github.com/apache/hbase-operator-tools/tree/master/hbase-hbck2