Configuring the Adapter for Apache Phoenix

Topics:

How to:

Reference:

Configuring the adapter consists of specifying connection and authentication information for each of the connections you want to establish.

Procedure: How to Configure the Apache Phoenix Adapter

You can configure the adapter from either the Web Console or the Data Management Console.

  1. From the Web Console sidebar, click Connect to Data.

    or

    From the Data Management Console, expand the Adapters folder.

    In the DMC, the Adapters folder opens. In the Web Console, the Adapters page opens showing your configured adapters.

  2. In the Web Console, click the New Datasource button on the menu bar and find the adapter on the page or, in the DMC, expand the Available folder if it is not already expanded.
    On the Web Console, you can select a category of adapter from the drop-down list or use the search option (magnifying glass) to search for specific characters.
  3. In the DMC, expand the appropriate group folder and the specific adapter folder. The group folder is described in the connection attributes reference.
  4. Right-click Apache Phoenix and click Configure.
  5. In the URL box, enter the URL used to connect to your Drillbit. For more information, see Apache Phoenix URL Configuration Settings.
  6. In the Driver Name box, enter the following:
     org.apache.phoenix.jdbc.PhoenixDriver
  7. For Security, select Trusted.

    Note: Explicit should not be used because Phoenix ignores any user ID that is entered; it connects with the user ID that was used to start the server. Individual user credentials can only be used with a secured (Kerberos enabled) server and are specified in the URL.

  8. Click Configure.

Reference: Apache Phoenix URL Configuration Settings

The Adapter for Apache Phoenix is under the SQL group folder.

The URL configuration for the Apache Phoenix adapter is:

jdbc:phoenix:quorum:[port:[/directory[:principal[:keytab]]]]

where:

quorum

Is a comma separated list of ZooKeeper servers.

port

Is the port number for ZooKeeper. The default value is 2181. On a MapR cluster, the default value is 5181.

directory

Is the name of the Phoenix directory within ZooKeeper.

For a server that does not have Kerberos enabled, the default is /hbase-unsecure .

For a Kerberos enabled server, the default is /hbase-secure.

Note: The directory names listed above must be entered exactly as written.

principal
The Kerberos user principal. For example:
user@REALM
keytab
The Kerberos keytab containing the specified user. For example:
/home/user/user.keytab

The following is an example of an unsecured server with one zookeeper node:

jdbc:phoenix:clu0:2181:/hbase-unsecure

The following is an example for a secured server with three zookeeper nodes:

jdbc:phoenix:clu1,clu2,clu3:2181:/user@REALM.COM:
/user/home/user.keytab

Troubleshooting

If the server is unable to configure the connection, a dialog box opens with an error message. The message typically begins with the following:

(FOC1400) SQLCODE IS -1 (HEX: FFFFFFFF) XOPEN: nnnn

where:

nnnn

Is the message number returned.

Some of the more common errors are:

(FOC1500) : (-1) [00000] JDBFOC>> connectx():
(FOC1500) : java.lang.UnsupportedClassVersionError:   
org/apache/drill/jdbc/Driver :   
(FOC1500) : Unsupported major.minor version 51.0   
(FOC1479) ERROR CONNECTING TO SQL DATABASE

This indicates that your Java version is less than 1.8, which is required.

WebFOCUS

Feedback