Big Data - HBASE

Back to Course

Lesson Description

Lession - #876 HBase Drop a Table


Dropping a Table utilizing HBase Shell

Using the drop command, you can erase a table. Prior to dropping a table, you need to disable it.

Confirm whether the table is erased using the exists command.


This command is utilized to drop the tables matching the "regex" provided in the order. Its syntax is as per the following:

Note: Before dropping a table, you should disable it.

Deleting a Table Using Java API
You can delete a table utilizing the deleteTable(>
strategy in the HBaseAdmin class. Follow the means given below to erase a table utilizing java API.

Stage 1
Instantiate the HBaseAdmin class.

Stage 2
Disable the table utilizing the disableTable(>
strategy for the HBaseAdmin class.

Stage 3
Presently erase the table utilizing the deleteTable(>
strategy for the HBaseAdmin class.

Given b elow is the finished java program to erase a table in HBase.

compile and execute the above program as displayed below.

The following should be the result: