Phoenix data source

更新时间:
复制 MD 格式

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

  1. Log on to the LTS web UI. In the left-side navigation pane, choose Data Source Manage > Add Data Source.

  2. On the Add data source page, configure the following parameters.

    ParameterDescriptionExample
    NameA custom identifier for the data source. Use only letters and digits.MyPhoenixDS
    Data Source TypeThe type of data source to add.Select Phoenix.
    ParametersA JSON object containing connection details. See the parameter fields below.See the example below.
  3. 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"
    }
    FieldDescriptionExample
    queryserverThe URL of the Phoenix Query Server. Format: <scheme>://<host>:<port>. The default port is 8765.http://phoenix-server.example.com:8765
    clusterKeyThe 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 is 2181.zk1.example.com.zk2.example.com.zk3.example.com:2181:/hbase
    hbaseDirThe HBase root directory path on the Hadoop Distributed File System (HDFS)./hbase
    hdfsUrlThe hostname and port of the HDFS NameNode.namenode.example.com:8020
  4. Click Add.