DRILL-6270: Added general option --jvm, which can be used to set the remote debug jvm options.
The option is not needed for drillbit startup, you can set the jvm properties directly after the start command. Usage: bin/drill-embedded --jvm "[JVM options]" bin/sqlline -u "jdbc:drill:zk=zkaddr:port" --jvm "[JVM options]" bin/drillbit.sh start [JVM options] sqlline.bat -u "jdbc:drill:zk=local" --jvm "[JVM options]" closes #1210 Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/23d89095 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/23d89095 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/23d89095 Branch: refs/heads/master Commit: 23d890950fb3b70040ede60cbe36473653738f82 Parents: 6fcaf42 Author: Anton Gozhiy <[email protected]> Authored: Tue Mar 27 13:29:14 2018 +0300 Committer: Vitalii Diravka <[email protected]> Committed: Sun Apr 29 23:20:54 2018 +0300 ---------------------------------------------------------------------- distribution/src/resources/sqlline | 4 ++++ distribution/src/resources/sqlline.bat | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/23d89095/distribution/src/resources/sqlline ---------------------------------------------------------------------- diff --git a/distribution/src/resources/sqlline b/distribution/src/resources/sqlline index 9f20f0a..1473ef0 100644 --- a/distribution/src/resources/sqlline +++ b/distribution/src/resources/sqlline @@ -46,6 +46,10 @@ for (( i=0; i < ${#args[@]}; i++ )); do -f) FILE=${args[i+1]} let i=$i+1 ;; + --jvm) + DRILL_SHELL_JAVA_OPTS="$DRILL_SHELL_JAVA_OPTS ${args[i+1]}" + let i=$i+1 + ;; *) SLARGS+=("${args[i]}");; esac done http://git-wip-us.apache.org/repos/asf/drill/blob/23d89095/distribution/src/resources/sqlline.bat ---------------------------------------------------------------------- diff --git a/distribution/src/resources/sqlline.bat b/distribution/src/resources/sqlline.bat index 58d950e..ac5a626 100755 --- a/distribution/src/resources/sqlline.bat +++ b/distribution/src/resources/sqlline.bat @@ -81,6 +81,14 @@ if x%1 == x--config ( shift ) +if x%1 == x--jvm ( + set DRILL_SHELL_JAVA_OPTS=!DRILL_SHELL_JAVA_OPTS! %2 + set DRILL_SHELL_JAVA_OPTS=!DRILL_SHELL_JAVA_OPTS:"=! + set atleastonearg=1 + shift + shift +) + if "!atleastonearg!"=="0" ( set DRILL_ARGS=!DRILL_ARGS! %~1 shift @@ -132,11 +140,11 @@ if "test%DRILL_LOG_DIR%" == "test" ( set DRILL_LOG_DIR=%DRILL_HOME%\log ) -@rem Drill temporary directory is used as base for temporary storage of Dynamic UDF jars. -if "test%DRILL_TMP_DIR%" == "test" ( - set DRILL_TMP_DIR=%TEMP% -) - +@rem Drill temporary directory is used as base for temporary storage of Dynamic UDF jars. +if "test%DRILL_TMP_DIR%" == "test" ( + set DRILL_TMP_DIR=%TEMP% +) + rem ---- rem Deal with Hadoop JARs, if HADOOP_HOME was specified rem ----
