HBase - Admin API


HBase is written in java, therefore it provides java API to communicate with HBase. Java API is the fastest way to communicate with HBase. Given below is the referenced java Admin API that covers the tasks used to manage tables.

Class HBaseAdmin

HBaseAdmin is a class representing the Admin. This class belongs to the org.apache.hadoop.hbase.client package. Using this class, you can perform the tasks of an administrator. You can get the instance of Admin using Connection.getAdmin() method.

Methods and Description

S.No. Methods and Description

void createTable(HTableDescriptor desc)

Creates a new table.


void createTable(HTableDescriptor desc, byte[][] splitKeys)

Creates a new table with an initial set of empty regions defined by the specified split keys.


void deleteColumn(byte[] tableName, String columnName)

Deletes a column from a table.


void deleteColumn(String tableName, String columnName)

Delete a column from a table.


void deleteTable(String tableName)

Deletes a table.

Class Descriptor

This class contains the details about an HBase table such as:

  • the descriptors of all the column families,
  • if the table is a catalog table,
  • if the table is read only,
  • the maximum size of the mem store,
  • when the region split should occur,
  • co-processors associated with it, etc.


S.No. Constructor and summary

HTableDescriptor(TableName name)

Constructs a table descriptor specifying a TableName object.

Methods and Description

S.No. Methods and Description

HTableDescriptor addFamily(HColumnDescriptor family)

Adds a column family to the given descriptor