Hbase Java API introduction

Hbase Java API introduction

The correspondence between several main Hbase API classes and data models:
Please add image description

1、 HBaseAdmin

Relationship: org.apache.hadoop.hbase.client.HBaseAdmin
Function: Provides an interface to manage table information of the HBase database. The methods it provides include: creating tables, deleting tables, listing table items, making tables valid or invalid, and adding or deleting table column family members, etc.
Please add image description
Please add image description

2、 HBaseConfiguration

Relationship: org.apache.hadoop.hbase.HBaseConfiguration
Function: Configure HBase
Please add image description

3、 HTableDescriptor

Relationship: org.apache.hadoop.hbase.HTableDescriptor
Function: Contains the name of the table and the column family of the corresponding table
Please add image description

4、 HColumnDescriptor

Relationship: org.apache.hadoop.hbase.HColumnDescriptor
Role: Maintains information about column families, such as version numbers, compression settings, etc. It is usually used when creating a table or adding a column family to a table. Column families cannot be modified directly after they are created, only by deleting and then re-creating them.
When a column family is deleted, the data in the column family will also be deleted at the same time.
Please add image description

5、 HTable

Relationship: org.apache.hadoop.hbase.client.HTable
Function: Can be used to communicate directly with HBase tables. This method is not thread-safe for update operations.
Please add image description

6、 Put

Relationship: org.apache.hadoop.hbase.client.Put
Function: Used to perform add operations on a single row
Please add image description

7、 Get

Relationship: org.apache.hadoop.hbase.client.Get
function: used to obtain relevant information of a single row
Please add image description

8、 Result

Relationship: org.apache.hadoop.hbase.client.Result
Function: Stores the single row value of the table obtained after the Get or Scan operation. Use the methods provided by this class to directly obtain values ​​or various Map structures (key-value pairs)
Please add image description
Please add image description

Guess you like

Origin blog.csdn.net/agatha_aggie/article/details/127261412