Installing Drill on the Cluster
You install Drill on nodes in the cluster, configure a cluster ID, and add Zookeeper information, as described in the following steps:
Install
- Download the latest version of Apache Drill
- Extract the tarball to the directory of your choice, such as
/opt
:tar -xf apache-drill-<version>.tar.gz
(Optional) Create the site directory
The site directory contains your site-specific files for Drill. Putting these in a separate directory to the Drill installation means that upgrading Drill will not overwrite your configuration and custom code. It is possible to skip this step, meaning that your configuration and custom code will live in the $DRILL_HOME/conf
and $DRILL_HOME/jars/3rdparty
subdirectories respectively.
Create the site directory in a suitable location, e.g.
export DRILL_SITE=/etc/drill-site
mkdir $DRILL_SITE
When you do a fresh install, Drill includes a conf directory under $DRILL_HOME. Use the files in that directory to create your site directory.
cp $DRILL_HOME/conf/drilloverrideexample.conf \
$DRILL_SITE/drilloverride.conf
cp $DRILL_HOME/conf/drill-on-yarnexample.conf \
$DRILL_SITE/drill-on-yarn.conf
cp $DRILL_HOME/conf/drillenv.sh $DRILL_SITE
You will use the site directory each time you start Drill by using the --site
(or --config
) option. The following are examples.
drillbit.sh --site $DRILL_SITE
drill-on-yarn.sh --site $DRILL_SITE
Once you have created your site directory, upgrades are trivial. Simply delete the old Drill distribution and install the new one. Your files remain unchanged in the site directory.
ZooKeeper configuration
In drill-override.conf,
use the Drill cluster ID
, and provide ZooKeeper host names and port numbers to configure a connection to your ZooKeeper quorum.
- Edit
drill-override.conf
located in theconf
directory. - Provide a unique
cluster-id
and the ZooKeeper host names and port numbers inzk.connect
. If you install Drill on multiple nodes, assign the same cluster ID to each Drill node so that all Drill nodes share the same ID. The default ZooKeeper port on the open source version of Apache Drill is 2181.
Example
drill.exec:{
cluster-id: "<mydrillcluster>",
zk.connect: "<zkhostname1>:<port>,<zkhostname2>:<port>,<zkhostname3>:<port>"
}
Custom JARs
If you develop custom code (data sources or user-defined functions, a.k.a. UDFs), place the Java JAR files in $DRILL_SITE/jars.