Looking at the source code of the apache drill
file drill-config.sh
, there is the comment:
...
# included in all the drill scripts with source command
# should not be executable directly
# also should not be passed any arguments, since we need original $*
...
Reading through the source code, it seems like it is mostly just setting environment variable for drill to use. So my question is, does running this script directly from the CLI interfere with any drill
or hadoop
processes that may already be running or cause any other unexpected behavior?
Note: Asking because accidentally ran this script when it auto-completed in the terminal.
To your specific question: the script itself does nothing other than set env vars. No harm (or benefit) to running it on its own.
For others who may find themselves here from a search...
The code in drill-config.sh is designed to be part of the drillbit.sh script: it expects certain env vars to be set, gets more from a drill-env.sh and so on. Then, the drill scripts use the information from drill-config.sh to get ready to launch Drill.
In general, you should try to use the drillbit.sh script to launch Drill. Use the many config options documented in drill-env.sh (since Drill 1.8 or so) to pass your config needs to the scripts.
The Drill team modifies these scripts from time to time. By using the public interface (drillbit.sh and friends), you will have an easy upgrade path. If you try to roll your own, you may find yourself fighting little config issues here and there as things change.