drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [12/13] drill git commit: DRILL-5685: Provide a way to set common environment variable between sqlline and Drillbit differently.
Date Tue, 15 Aug 2017 13:44:24 GMT
DRILL-5685: Provide a way to set common environment variable between sqlline and Drillbit differently.

close #883


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/ae123e16
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/ae123e16
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/ae123e16

Branch: refs/heads/master
Commit: ae123e166af2ddb22c79b8cb93278a66fccc3be4
Parents: f1e1dfe
Author: Sorabh Hamirwasia <shamirwasia@maprtech.com>
Authored: Mon Jul 24 13:21:55 2017 -0700
Committer: Jinfeng Ni <jni@apache.org>
Committed: Mon Aug 14 22:19:24 2017 -0700

----------------------------------------------------------------------
 distribution/src/resources/drill-env.sh | 10 ++++++++++
 distribution/src/resources/drillbit.sh  |  5 +++++
 2 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/ae123e16/distribution/src/resources/drill-env.sh
----------------------------------------------------------------------
diff --git a/distribution/src/resources/drill-env.sh b/distribution/src/resources/drill-env.sh
index 62dffe6..8211c3c 100644
--- a/distribution/src/resources/drill-env.sh
+++ b/distribution/src/resources/drill-env.sh
@@ -147,3 +147,13 @@
 # Set to "/tmp" by default.
 #
 # export DRILL_TMP_DIR="..."
+
+# Block to put environment variable known to both Sqlline and Drillbit, but needs to be
+# differently set for both. OR set for one and unset for other.
+#
+# if [ "$DRILLBIT_CONTEXT" = "1" ]; then
+#   Set environment variable value to be consumed by Drillbit
+# else
+#   Set environment variable value to be consumed by Sqlline
+# fi
+#

http://git-wip-us.apache.org/repos/asf/drill/blob/ae123e16/distribution/src/resources/drillbit.sh
----------------------------------------------------------------------
diff --git a/distribution/src/resources/drillbit.sh b/distribution/src/resources/drillbit.sh
index bba7392..de7f21a 100755
--- a/distribution/src/resources/drillbit.sh
+++ b/distribution/src/resources/drillbit.sh
@@ -64,6 +64,11 @@ bin=`cd -P "$bin">/dev/null; pwd`
 base=`basename "${BASH_SOURCE-$0}"`
 command=${base/.*/}
 
+# Environment variable to indicate Drillbit is being setup. Later drill-env.sh
+# and distrib-env.sh can consume this to set common environment variable differently
+# for Drillbit and Sqlline.
+export DRILLBIT_CONTEXT=1
+
 # Setup environment. This parses, and removes, the
 # options --config conf-dir parameters.
 


Mime
View raw message