Database administration is more of an operational or technical level function responsible for physical database design, security enforcement, and database performance. Tasks include maintaining the data dictionary, monitoring performance, and enforcing organizational standards and security.
Admin API
HBase provides java API to communicate and few tasks used to manage tables is listed, with Java API.
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
- 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.
Constructors
- HTableDescriptor(TableName name) – Constructs a table descriptor specifying a TableName object.
Methods and Description
- HTableDescriptor addFamily(HColumnDescriptor family) – Adds a column family to the given descriptor
Apply for HBase Certification
https://www.vskills.in/certification/certified-hbase-professional