6.0
/
This document introduces how to connect to the HBase data source.
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).
Before connecting the database to FineBI, you need to collect the following information:
IP address and port number of the database server
Database name
Username and password (for username and password authentication); client principal and keytab file path (for Kerberos authentication)
Schema of the database to be connected
1. Log in to FineBI 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 and 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.
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.
Two methods are available to add database tables to FineBI.
Adding Database Tables
Adding SQL Datasets
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.
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.
2. Restart FineBI.
After successful HBase connection, when 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, periods( .)in the database tables. If you need to add fields of these two types, you are advised to use extracted data.
The database cannot be connected through JDBC. In this case, a message indicating that the system failed to get locations or ZooKeeper failed to find the corresponding address is displayed.
Check whether 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).
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.
If you fail to connect the Huawei HBase 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 NettyRpcCilent method cannot be found, as shown in the following figure.
The current database environment requires additional configuration. Connection using the usual way will result in a configuration file reading exception.
Adjust the configuration file and the connection URL 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.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy