Connecting to a ZooKeeper Cluster

The following is the format of a connection URL for connecting to a ZooKeeper cluster, where serverlist is a comma-separated list of servers in your ZooKeeper cluster, and clustername is the unique name of the drillbit cluster that you want to use:

jdbc:drill:zk=<serverlist>/drill/<clustername>

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

Optional Settings

The following is the format of a connection URL that 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>