Data Connection to HBase

  • Last update:October 19, 2024
  • Overview

    Version

    FineBI VersionFunctional Change

    6.0

    /

    Application Scenario

    This document introduces how to connect to the HBase data source.

    iconNote:
    This database does not support data tables with direct connection attributes.

    Preparation

    Version/Driver

    Supported Database Version
    Sample DriverSupported Database Version

    1.2

    phoenix-4.12.0-HBase-1.2-client.jar

    org.apache.phoenix.jdbc.PhoenixDriver

    Note: Place the driver package in hbase/lib, and restart HBase (using the commands ./stop-hbase.sh, and ./start-hbase.sh).

    Connection Information Collection

    Before connecting the database, you need to collect the following information:

    • IP address and port number of the server where the database is located

    • 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

    Connection Procedure

    1. Log in to FineBI as the admin, choose System Management > Data Connection > Data Connection Management, and click New Data Connection, as shown in the following figure.

    新建数据集截图.png

    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 Permissions Overview.


    2. Find the HBase icon, as shown in the following figure.

    3333.png

    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 Kerberos Authentication in Data Connection.

    iconNote:
    You can optionally modify other advanced settings. For details, see section "Advanced Settings" in Entry-Level Data Connection Configuration.

    信息填写.png

    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.

    连接成功.png

    Adding Database Tables to FineBI

    Two methods are available to add database tables to FineBI.

    公共数据库新建数据集截图.png

    Notes

    FineBI Always on the Startup Page

    Problem:

    After you place phoenix-4.12.0-HBase-1.2-client.jar in %FineBI%\webapps\webroot\WEB-INF\lib and restart FineBI, FineBI remains on the startup page, as shown in the following figure.

    启动页面截图.png

    Solution:

    1. Open the phoenix-4.12.0-HBase-1.2-client.jar file with a compression tool, enter the javax folder, and delete the el and servlet files, as shown in the following figure.

    111.png

    222.png

    2. Restart FineBI.

    Adding SQL Datasets

    After the successful HBase connection, if you add real-time SQL datasets and create self-service datasets, FineBI does not support field names with lowercase letters and special characters (for example, .) in the database tables. If you need to add fields of the two types, you are advised to use extracted data.

    Failed Database Connection Through JDBC

    Problem:

    The database cannot be connected through JDBC. In this case, the message indicating that the system failed to get locations or ZooKeeper failed to find the corresponding address is displayed.

    Solution:

    Check if the IP address corresponding to the machine name in /etc/hosts is a LAN IP address.

    Check if the machine name set in /etc/hostname is consistent with that set in /etc/hosts.

    Check if the IP address and machine name in the hosts file of the machine where FineBI is located is correct.

    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).

    Database Connection Through SQuirreL

    Solution:

    Download SQuirreL at https://sourceforge.net/projects/squirrel-sql/?source=typ_redirect by referring to http://phoenix.apache.org/installation.html#SQL_Client. After installing SQuirreL by default, place the phoenix-xxxx-client.jar in %SQuirrel_HOME%/lib. Start SQuirreL first, and add the driver and the alias.

    Connection Error

    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.

    报错截图.png

    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.

    附件列表


    主题: Data Preparation
    • Helpful
    • Not helpful
    • Only read

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

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

    不再提示

    7s后關閉

    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