Overview
Version
FineReport Version | Functional Change |
---|---|
11.0 | / |
11.0.1 | Changed the database driver package upload method, allowing you to implement hot swapping through Driver Management. |
Application Scenario
This document introduces how to connect to the HBase data source.
Preparation
Version/Driver
Download the driver package and upload it to FineReport. For details, see section "Creating a Data Connection" in Driver Management.
Supported Database Version | Driver Download Link | Driver |
---|---|---|
1.2 | org.apache.phoenix.jdbc.PhoenixDriver |
Relevant Information Checking
1. Check if the IP address corresponding to the machine name in /etc/hosts is a LAN IP address.
2. Check if the machine name set in /etc/hostname is consistent with that set in /etc/hosts.
3. Check if the IP address and machine name in the hosts file of the machine where FineReport is located are correct.
4. During local connection, you need to configure the hosts file in /etc/hosts and add remote mapping (IP address and Machine name, for example, 192.168.5.206 centos-phoenix).
Connection Information Collection
Before connecting the database, you need to collect the following information:
IP address and port number of the database server
Database name
Username and password (if username and password authentication is used); client principal and keytab file path (if Kerberos authentication is used)
Schema of the database to be connected

1. HBase does not support SQL queries. You need to introduce Phoenix (the open-source SQL engine of HBase) to realize SQL queries of HBase. You can search the internet for how to install the Phoenix service. FanRuan does not provide related assistance or instructions.
2. After you install the Phoenix service, two files, namely hbase-site.xml and hdfs-site.xml, are generated. You need to place the two files in the client driver prepared in section "Version/Driver" and update them to the FineReport project.
Connection Procedure
Two methods of data connection are available in FineReport:
Method one: Perform data connection in the designer. For details, see [Designer] JDBC Data Connection.
Method two: Perform data connection on the decision-making platform. This document mainly describes this method.
1. Log in to the decision-making platform as the admin, choose System Management > Data Connection > Data Connection Management, click Create, and select Data Connection, as shown in the following figure.

2. Find the HBase icon, as shown in the following figure.
3. Select Custom from the Driver drop-down list, select the driver uploaded in section "Version/Driver", and enter the connection information collected in section "Connection Information Collection."
HBase supports Kerberos authentication. For details about Kerberos authentication methods, see [Platform] Kerberos Authentication in Data Connection.

4. Click Click to Connect Database, and select the database schema after successful connection. (If no database schema is selected, the default schema will be used.) Finally, save the data connection, as shown in the following figure.
Adding Tables in the Database to FineReport
For details, see Dataset.
Connection Exception Problem
Problem
If you fail to connect the Huawei HBbase database (big data platform) when using the above-mentioned driver, the error message "Unable to find org.apache.hadoop.hbase.ipc.NettyRpcClient” will be displayed, indicating that the NettyipcCilent method cannot be found, as shown in the following figure.
Cause
The current database environment requires additional configuration. Connection using the usual way will result in a configuration file reading exception.
Solution
Adjust the configuration file and the URL connection writing syntax to solve the validation issue and achieve direct database connection.
Configuration file modification: Write the configuration method used into Hbase-site.xml, and place the XML file into the relevant JAR package.
URL modification: Change the format of HBase data connection URL to jdbc:phoenix:quorum:port/database:pricinpal:keytabPath. Relevant attributes can be obtained by URL parsing, and the configuration of attributes obtained from the URL will be used preferentially.