Downloading and Configuring the Driver
This topic provides instructions for downloading and configuring the Drill JDBC driver for SQuirreL.
About this task
When you configure the driver, you define the driver and create an alias. The alias is a specific instance of the driver configuration. SQuirreL uses the driver definition and alias to connect to Drill so you can access data sources that you have registered with Drill. When you create the alias, you provide a connection URL that includes the name of the Drill directory stored in ZooKeeper and the cluster ID. The URL has the following format:
jdbc:drill:zk=<zookeeper_quorum>/<drill_directory_in_zookeeper>/<cluster_ID>
The following example shows a URL for Drill installed on a single node:
jdbc:drill:zk=10.10.100.56:5181/drill/demo_mapr_com-drillbits
jdbc:drill:zk=10.10.100.24:2181/drill/drillbits1
The following example shows a URL for Drill installed in distributed mode with a connection to a ZooKeeper quorum:
jdbc:drill:zk=10.10.100.30:5181,10.10.100.31:5181,10.10.100.32:5181/drill/drillbits1
- The ZooKeeper port is 2181. In a data-fabric cluster, the ZooKeeper port is 5181.
- The Drill directory stored in ZooKeeper is
/drill
. - The Drill default cluster ID is
drillbits1
. To determine the cluster ID, check the following file:
For example:<drill-installation>/conf/drill-override.conf
... drill.exec: { cluster-id: "docs41cluster-drillbits", zk.connect: "centos23.lab:5181,centos28.lab:5181,centos29.lab:5181" } ...
To use the Drill JDBC driver with SQuirreL, complete the following steps:
Procedure
- Download the latest Drill JDBC Driver and then unzip the file. The Drill JDBC Driver JAR files must exist in a directory on your machine before you can configure the driver in the SQuirreL client.
-
If using the data-fabric-SASL or Plain authentication mechanism, add the
Drill JDBC JAR files and /opt/mapr/lib/* to Squirrel’s classpath, as shown in
the following example when the path to the driver is
C:\driver\MapRDrillJDBC41-1.5.6.1012:
-cp "%SQUIRREL_CP%;C:\driver\MapRDrillJDBC41-1.5.6.1012\*;C:\opt\mapr\lib\*"
NOTEThe driver JAR files should appear before /opt/mapr/lib/* in the classpath. -
Define the driver.
-
Create a database alias.