Let's see a HBase example to import data of a file in HBase table.
We have to import data present in the file into an HBase table by creating it through Java API.
Data_file.txt contains the below data
The Java code is shown below
This data has to be inputted into a new HBase table to be created through JAVA API. Following column families have to be created
Column family region has three column qualifiers: country, state, city
Column family Time has two column qualifiers: year, month
Make sure that the following jars are present while writing the code as they are required by the HBase.