This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch adding_plugin_dir_env_var_in_script
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 76d9404b3b3461e480eb70e26ee7cfe03a3f5399
Author: Xiang Fu <[email protected]>
AuthorDate: Thu Nov 26 00:53:24 2020 -0800

    Make plugins to be configurable in environment variables
---
 .../src/main/resources/appAssemblerScriptTemplate        | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/pinot-tools/src/main/resources/appAssemblerScriptTemplate 
b/pinot-tools/src/main/resources/appAssemblerScriptTemplate
index 4873623..03ce9e0 100644
--- a/pinot-tools/src/main/resources/appAssemblerScriptTemplate
+++ b/pinot-tools/src/main/resources/appAssemblerScriptTemplate
@@ -182,15 +182,21 @@ fi
 
 if [ -z "$JAVA_OPTS" ] ; then
   ALL_JAVA_OPTS="@EXTRA_JVM_ARGUMENTS@"
-
-  # For java 8, we set jvm system property `plugins.dir` to load Pinot plugins
-  if [ "$JAVA_VER" -eq 8 ] ; then
-    ALL_JAVA_OPTS="$ALL_JAVA_OPTS -Dplugins.dir=$BASEDIR/plugins"
-  fi
 else
   ALL_JAVA_OPTS=$JAVA_OPTS
 fi
 
+# For java 8, we set jvm system property `plugins.dir` to load Pinot plugins
+if [ "$JAVA_VER" -eq 8 ] ; then
+  if [ -z "$PLUGINS_DIR" ] ; then
+    PLUGINS_DIR=$BASEDIR/plugins
+  fi
+  ALL_JAVA_OPTS="$ALL_JAVA_OPTS -Dplugins.dir=$PLUGINS_DIR"
+  if [ -n "$PLUGINS_INCLUDE" ] ; then
+    ALL_JAVA_OPTS="$ALL_JAVA_OPTS -Dplugins.include=$PLUGINS_INCLUDE"
+  fi
+fi
+
 # For java 9 and later, we need to set extra java options to access JDK’s 
internal APIs.
 if [ "$JAVA_VER" -gt 8 ] ; then
   ALL_JAVA_OPTS="--add-exports java.base/jdk.internal.ref=ALL-UNNAMED 
$ALL_JAVA_OPTS"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to