-
Notifications
You must be signed in to change notification settings - Fork 980
Install Drill from a Local Build
Paul Rogers edited this page Jun 18, 2019
·
2 revisions
Every so often I need to run the Drill server from a local build, and each time I must reinvent the steps. Here, so save me (and perhaps you) time, is what needs to happen.
- Clone and build Drill. This is well-described elsewhere. It will leave you with a full Drill build deep in the Drill directory tree.
- Edit
~/.bashrc
with some convenient file locations:
# Location where Drill was cloned
export DRILL_GIT=~/eclipse-workspace/drill
# Current Drill version, from Maven
export DRILL_VERS=1.17.0-SNAPSHOT
# Location of the locally-built Drill
export DRILL_HOME=$DRILL_GIT/distribution/target/apache-drill-$DRILL_VERS/apache-drill-$DRILL_VERS
# Location of config files OUTSIDE of the above directory
export DRILL_SITE=~/site
# Location where you will (or have installed) ZK
export ZK_HOME=~/bin/apache-zookeeper-3.5.5-bin
- Log out and back in, or
source ~/.bashrc
. - Create the Drill site directory:
mkdir $DRILL_SITE
cp $DRILL_HOME/conf/drill-override.conf $DRILL_SITE
- Install Zookeeper. Just use the defaults.
- Make the ZK state directory:
sudo mkdir /var/lib/zookeeper
sudo chmod a+rwx /var/lib/zookeeper
- Start ZK:
$ZK_HOME/zkServer.sh start
- Create a wrapper script for Drill:
vi ~/bin/drill
#! /bin/bash
$DRILL_HOME/bin/drillbit.sh --site $DRILL_SITE $@
- Create a wrapper script for Sqlline:
vi ~/bin/sqlline
:
#! /bin/bash
$DRILL_HOME/bin/sqlline --site $DRILL_SITE -u jdbc:drill:zk=localhost:2181
- Make sure that the IP address for your machine is not the loopback:
hostname
cat /etc/hosts
If you see:
myMachine
127.0.0.1 myMachine
Then do this:
- Get the local IP address. (Works only for static IPs):
ifconfig
- Edit
/etc/hosts
to use that IP address instead of the loopback address. - Start Drill:
drill start
(Assuming that~/bin
is on your path.) - Wait 10 seconds. Verify Drill started:
drill status
- If not, track down the issue using the log file shown at startup.
- Check that sqlline works:
sqlline
.
If all is good, you are ready to go.
The steps above put configuration outside of the Drill build. So, if you change configuration, do it in the $DRILL_SITE
directory, not the build location. By using the server, storage configs are persisted across Drill builds.