HBase Admin API – Class Descriptor & Class HBaseAdmin

1. Objective – HBase Admin API

In this HBase tutorial, “HBase Admin API” we will introduce the class which represents the Admin in HBase, called as HBase Admin API. We will also cover the role of Class Descriptor in HBase. Here, along with the methods as well as their relevant descriptions. Also, we will see HBase admin example.
So, let’s start HBase Admin API tutorial.

HBase Admin API

HBase Admin API – Class Descriptor & Class HBaseAdmin

2. What is HBase Admin API?

HBase permits Java API in communicating with HBase because HBase is written in Java. However, the fastest way to communicate with HBase is Java API. So, here, we are describing the referenced Java Admin API below, that covers the tasks used for managing tables.
Let’s see HBase Security: Kerberos Authentication & Authorization

If these professionals can make a switch to Big Data, so can you:
Rahul Doddamani Story - DataFlair
Rahul Doddamani
Java → Big Data Consultant, JDA
Follow on
Mritunjay Singh Success Story - DataFlair
Mritunjay Singh
PeopleSoft → Big Data Architect, Hexaware
Follow on
Rahul Doddamani Success Story - DataFlair
Rahul Doddamani
Big Data Consultant, JDA
Follow on
I got placed, scored 100% hike, and transformed my career with DataFlair
Enroll now
Deepika Khadri Success Story - DataFlair
Deepika Khadri
SQL → Big Data Engineer, IBM
Follow on
DataFlair Web Services
You could be next!
Enroll now

3. Class HBaseAdmin

A class which represents the Admin in HBase is HBaseAdmin. Basically, it is affiliated to the org.apache.hadoop.hbase.client package. However, a user can perform the tasks of an administrator, Using this class. Also by using Connection.getAdmin() method, they can get the instance of Admin.

a. Methods and Description

i. void createTable(HTableDescriptor desc)
In order to create a new table, we use this method.
ii. void createTable(HTableDescriptor desc, byte[][] splitKeys)
However, it also creates a new table along with the initial set of empty regions which is defined by the specified split keys.
iii. void deleteColumn(byte[] tableName, String columnName)
Basically, to delete a column from a table, we use this method.
iv. void deleteColumn(String tableName, String columnName)
This method helps to delete a column from a table.
v. void deleteTable(String tableName)
The method, ‘void deleteTable” deletes a table.
Explore HBase Shell & Commands – Usage & Starting HBase Shell

Hadoop Quiz

4. Class Descriptor in HBase Admin API

As per its name, it consists of the details about an HBase table, like:

  • About the descriptors of all the column families.
  • Whether the table is a catalog table.
  • Is the table is read-only?
  • About the maximum size of the mem store.
  • Also, it tells when the region split should occur.
  • About the co-processors associated with it.

a. Constructor and Summary

HTableDescriptor(TableName name)
Basically, it constructs a table descriptor specifying a TableName object.

b. Methods and Description

HTableDescriptor addFamily(HColumnDescriptor family)
In order to add a column family to the given descriptor, we use it.
Let’s learn HBase Commands
So, this was all about HBase Admin API.

5. Conclusion: HBase Admin API

Hence, in this HBase Administration tutorial, we have seen the whole concept of HBase Admin API. Next, we will see HBase Client API. However, if any doubt occurs, regarding HBase Admin API, feel free to ask. We will definitely get back to you.
See also – 
Table Management Commands in HBase
For reference

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.