This Java application showcases how to connect to an HBase database and perform basic operations such as creating tables and inserting data .
The code accomplishes the following tasks:
-
Configuration Setup: It configures the connection settings for HBase, including the ZooKeeper quorum and client port.
-
Connection Establishment: It establishes a connection to the HBase database using the configured settings.
-
Table Creation: It checks if a table named "users" exists. If not, it creates the table with two column families: "personal data" and "professional data".
-
Data Insertion: It inserts sample data into the "users" table under a specified row key. The sample data includes personal and professional information.
-
Status Reporting: It prints status messages indicating the success of table creation and data insertion.
-
Data Deletion: It deletes all the data.