Add a Phoenix data source to Lindorm Tunnel Service (LTS) to query HBase data through the Phoenix SQL interface.
Supported cluster types
ApsaraDB for HBase clusters running Phoenix 4.x or Phoenix 5.x
User-created HBase clusters
E-MapReduce HBase clusters
Prerequisites
Before you begin, ensure that you have:
Access to the LTS web UI
The Phoenix Query Server URL for your HBase cluster (for example,
http://<query-server-host>:8765)The ZooKeeper connection string for your HBase cluster
Add a Phoenix data source
Log on to the LTS web UI. In the left-side navigation pane, choose Data Source Manage > Add Data Source.
On the Add data source page, configure the following parameters.
Parameter Description Example Name A custom identifier for the data source. Use only letters and digits. MyPhoenixDSData Source Type The type of data source to add. Select Phoenix. Parameters A JSON object containing connection details. See the parameter fields below. See the example below. In the Parameters field, enter a JSON object with the following fields.
LTS connects to HBase through both a Phoenix Query Server (thin client) and a direct ZooKeeper connection. All four fields are required.
{ "queryserver": "http://<query-server-host>:8765", "clusterKey": "<zk-host-1>.<zk-host-2>.<zk-host-3>:2181:/<hbase-root-node>", "hbaseDir": "/<hbase-root-dir>", "hdfsUrl": "<namenode-host>:8020" }Field Description Example queryserverThe URL of the Phoenix Query Server. Format: <scheme>://<host>:<port>. The default port is8765.http://phoenix-server.example.com:8765clusterKeyThe ZooKeeper connection string for your HBase cluster. Format: <host1>.<host2>.<host3>:<port>:<root-node>. HBase clusters typically have three ZooKeeper nodes. The default ZooKeeper port is2181.zk1.example.com.zk2.example.com.zk3.example.com:2181:/hbasehbaseDirThe HBase root directory path on the Hadoop Distributed File System (HDFS). /hbasehdfsUrlThe hostname and port of the HDFS NameNode. namenode.example.com:8020Click Add.