Basic HBase Java Classes and Methods – Part 8: Disable and Delete a Table

In order to delete a table in HBase it must be disabled first.  This forces any data in memory to be flushed to disk.  Because this is an admin operation, we must create an Admin object, similar to how we did when creating a table.  After the Admin object is created, we simply pass in the Table object to its disableTable method, followed by passing the Table object into its deleteTable method.   It’s very straight forward and simple.

Full code is below:


This entry was posted in Data Analytics and tagged , . Bookmark the permalink.

Leave a Reply