Connecting to a ZooKeeper Cluster

You can connect Drill to a ZooKeeper cluster using a connection URL.

The following connection URL shows you the format for connecting Drill to a ZooKeeper cluster. The serverlist is a comma-separated list of servers in the ZooKeeper cluster, and clustername is the unique name of the Drillbit cluster that you want to use.

jdbc:drill:zk=<serverlist>/drill/<clustername>
Note: You can locate the name of the Drillbit cluster in /opt/mapr/drill/drill-<version>/conf/drill-distrib.conf. The default name of the Drillbit cluster is drillbits1. The name is set by the cluster-id property. If you have multiple Drill clusters, you may want to override the Drillbit cluster name in drill-override.conf; however; first back-up your storage plugin configurations, as they will reset to the defaults when you change the cluster name. Restart Drill after you edit drill-override.conf.

Optionally, you can specify any of the connection properties supported by the driver. For a list of the properties available in the driver, see Drill JDBC Driver.

Optional Settings

The following connection URL specifies some optional settings:

jdbc:drill:zk=<serverlist>/drill/<clustername><clustername>;
<property1>=<value><value>;
<property2>=<value><value>;...

Example

To connect to a ZooKeeper cluster and authenticate the connection with Plain authentication (a username and password), you would use the following connection URL:

jdbc:drill:zk=192.168.39.43:5181, 192.168.1.1:31010/drill/drillbits1;
auth=PLAIN;
UID=<username>;
PWD=<password>