[Platform] Data Connection to HBase

  • Last update:March 28, 2025
  • Overview

    Version

    FineReport VersionFunctional 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 VersionDriver Download LinkDriver

    1.2

    phoenix-4.12.0-HBase-1.2-client.jar

    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

    iconNote:

    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.

    iconNote:
    If you are not the admin, you can configure data connections only after the admin assigns you the permission on Data Connection Management. For details, see Data Connection Permission Overview.

    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.

    iconNote:
    You can optionally modify other advanced settings. For details, see Advanced Setting in Data Connections.

    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.

    Attachment List


    Theme: Data Preparation
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy