...

Big Data - HBASE

Back to Course

Lesson Description


Lession - #868 HBase Disabling a Table


Disabling Table

Debilitating a Table utilizing HBase Shell

To erase a table or change its settings, you want to initially disable the table utilizing the disable order. You can re-enabler it utilizing the enable order.

Given beneath is the example to show a table:



is_disabled

This order is utilized to observe whether a table is disabled. Its syntax structure is as per the following.



The model confirms whether the table named emp is disabled. On the off chance that it is desabled, it will return valid and if not, it will get back misleading.



disable_all

This order is utilized to debilitate every one of the tables matching the given regex. The language structure for disable_all order is given underneath.



Assume there are 5 tables in HBase, specifically raja, rajani, rajendra, rajesh, and raju. The accompanying code will desable every one of the tables beginning with raj.



Disable a Table Using Java API
To check whether a table is

disabled, isTableDisabled(>
technique is utilized and to desable a table, disableTable(>
strategy is utilized. These techniques have a place with the HBaseAdmin class. Follow the means given below to disablee a table.

Stage 1
instantiate HBaseAdmin class as displayed below.



Stage 2
Confirm whether the table is disabled utilizing isTableDisabled(>
technique as displayed below.



Stage 3
On the off chance that the table isn't disabled, disable it as displayed below.


Given below is the finished program to check whether the table is disabled; if not, how to disable it.



compile and execute the above program as displayed below.



The following should be the result: