Configuring the Adapter for Apache Drill

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 Drill 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 drop-down list 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 the adapter name and/or version and select Configure.

    The Add Adapter to Configuration pane opens.

  5. In the URL box, enter the URL used to connect to your Drillbit. For more information, see Apache Drill URL Configuration Settings.
  6. In the Driver Name box, type the JDBC driver that you are using from the following table:
    org.apache.drill.jdbc.Driver

    Adapter

    JDBC Driver Name

    Apache Hive

    org.apache.drill.jdbc.Driver

    MapR Drill

    com.mapr.drill.jdbc41.Driver
  7. Enter your User and Password.

    The following image shows an example of the configuration settings used:



  8. Click Test. You should see a list of data sources on your server.
  9. Click Configure.

Reference: Connection Attributes for Apache Drill

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

The following list describes the connection attributes for which you can supply values. To complete the attribute declaration, click the Configure button.x

Connection name

Logical name used to identify this particular set of connection attributes. The default is CON01.

URL

Location URL for the Apache Drill data source.

Driver Name

Name for the Apache Drill driver.

IBI_CLASSPATH

Defines the additional Java Class directories or full-path jar names which will be available for Java Services. Value may be set by editing the communications file or in the Web Console. Using the Web Console, you can enter one reference per line in the input field. When the file is saved, the entries are converted to a single string using colon (:) delimiters for all platforms. OpenVMS platforms must use UNIX-style conventions for values (for example, /mydisk/myhome/myclasses.jar, rather than mydisk:[myhome]myclasses.jar) when setting values. When editing the file manually, you must maintain the colon delimiter.

Security

There are three methods by which a user can be authenticated when connecting to a database server:

  • Explicit. The user ID and password are explicitly specified for each connection and passed to the database, at connection time, for authentication.
  • Password Passthru. The user ID and password received from the client application are passed to the database, at connection time, for authentication.
  • Trusted. The adapter connects to the database using the database rules for an impersonated process that are relevant to the current operating system.
User

Primary authorization ID by which you are known to the data source.

Password

Password associated with the primary authorization ID.

Select profile

Select a profile from the drop-down menu to indicate the level of profile in which to store the CONNECTION_ATTRIBUTES command. The global profile, edasprof.prf, is the default.

If you wish to create a new profile, either a user profile (user.prf) or a group profile if available on your platform (using the appropriate naming convention), choose New Profile from the drop-down menu and enter a name in the Profile Name field (the extension is added automatically).

Store the connection attributes in the server profile (edasprof).

Reference: Apache Drill URL Configuration Settings Using the Open Source Drill JDBC Driver

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

The URL configuration for the Apache Drill adapter is:

jdbc:drill:zk=quorum:port/directory/cluster_id[;schema=schema] 

where:

quorom

Is the name or IP address where the Drillbit server is running.

port

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

Multiple quorum:port values can be comma separated.

directory

Is the name of the drill directory within zookeeper. The default value is drill.

cluster_id

Is the name of the drill cluster. The default value is drillbit1.

schema

Is the name of the default schema to use, for example, hive.

Reference: Apache Drill URL Configuration Settings Using the MapR JDBC Driver

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

The URL configuration string for a client to Drillbit connection is:

jdbc:drill:drillbit=host[:port][:auth=method[:delegationuid=id]  

where:

host

Is the name or IP address where the drillbit is running.

port

Is the drillbit port. The default value is 31010.

The URL configuration string for a client to Zookeeper connection is:

jdbc:drill:zk=quorom[:port]/drill/[cluster][:auth=method[:delegationuid=id] ]

where:

quorom

Is the name or IP address where Zookeeper is running.

port

Is the Zookeeper port. The default value is 5181 for a MapR cluster.

cluster

Is the name of the drillbit cluster.

For either connection:

method

Is the authentication method. Values are plain, kerberos, or maprsasl.

id

Specifies the user ID it is connected to, when the authentication method is maprsasl.

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.7 which is required for Drill.

WebFOCUS

Feedback