This is an automated email from the ASF dual-hosted git repository.
dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/master by this push:
new 40500ecf27 DRILL-8498: Sqlline illegal reflective access warning
40500ecf27 is described below
commit 40500ecf273c955ee038f947c4d90d1ac4fd55e5
Author: Maksym Rymar <[email protected]>
AuthorDate: Wed Jun 12 09:59:54 2024 +0300
DRILL-8498: Sqlline illegal reflective access warning
---
distribution/src/main/resources/drill-config.sh | 17 ++++++++++-------
distribution/src/main/resources/sqlline | 2 +-
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/distribution/src/main/resources/drill-config.sh
b/distribution/src/main/resources/drill-config.sh
index cacfec20d9..8037a8faea 100644
--- a/distribution/src/main/resources/drill-config.sh
+++ b/distribution/src/main/resources/drill-config.sh
@@ -305,19 +305,22 @@ export DRILLBIT_OPTS="$DRILLBIT_OPTS
-XX:ReservedCodeCacheSize=$DRILLBIT_CODE_CA
# This option prevents the PDF Format Plugin from opening unnecessary Java
windows
export DRILLBIT_OPTS="$DRILLBIT_OPTS -Djava.awt.headless=true"
+REF_ACC_OPTS=""
# Check that java is newer than 1.8
"$JAVA" -version 2>&1 | grep "version" | egrep -e "1\.8" > /dev/null
if [ $? -gt 0 ]; then
# Allow reflective access on Java 9+
- export DRILLBIT_OPTS="$DRILLBIT_OPTS --add-opens
java.base/java.lang=ALL-UNNAMED"
- export DRILLBIT_OPTS="$DRILLBIT_OPTS
--add-opens=java.base/java.util=ALL-UNNAMED"
- export DRILLBIT_OPTS="$DRILLBIT_OPTS --add-opens
java.base/sun.nio.ch=ALL-UNNAMED"
- export DRILLBIT_OPTS="$DRILLBIT_OPTS --add-opens
java.base/java.net=ALL-UNNAMED"
- export DRILLBIT_OPTS="$DRILLBIT_OPTS --add-opens
java.base/java.nio=ALL-UNNAMED"
- export DRILLBIT_OPTS="$DRILLBIT_OPTS --add-opens
java.security.jgss/sun.security.krb5=ALL-UNNAMED"
+ REF_ACC_OPTS="$REF_ACC_OPTS --add-opens java.base/java.lang=ALL-UNNAMED"
+ REF_ACC_OPTS="$REF_ACC_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
+ REF_ACC_OPTS="$REF_ACC_OPTS --add-opens java.base/sun.nio.ch=ALL-UNNAMED"
+ REF_ACC_OPTS="$REF_ACC_OPTS --add-opens java.base/java.net=ALL-UNNAMED"
+ REF_ACC_OPTS="$REF_ACC_OPTS --add-opens java.base/java.nio=ALL-UNNAMED"
+ REF_ACC_OPTS="$REF_ACC_OPTS --add-opens
java.security.jgss/sun.security.krb5=ALL-UNNAMED"
+ export REF_ACC_OPTS
+
+ export DRILLBIT_OPTS="$DRILLBIT_OPTS $REF_ACC_OPTS"
fi
-
# Under YARN, the log directory is usually YARN-provided. Replace any
# value that may have been set in drill-env.sh.
diff --git a/distribution/src/main/resources/sqlline
b/distribution/src/main/resources/sqlline
index d8b36cf75c..a7c8db11da 100644
--- a/distribution/src/main/resources/sqlline
+++ b/distribution/src/main/resources/sqlline
@@ -78,7 +78,7 @@ if ! $is_cygwin; then
DRILL_SHELL_OPTS="$DRILL_SHELL_OPTS --color=true"
fi
-SHELL_OPTS="$DRILL_SHELL_JAVA_OPTS $SQLLINE_JAVA_OPTS $DRILL_SHELL_LOG_OPTS
$CLIENT_GC_OPTS -Dorg.jline.terminal.dumb=true"
+SHELL_OPTS="$DRILL_SHELL_JAVA_OPTS $SQLLINE_JAVA_OPTS $REF_ACC_OPTS
$DRILL_SHELL_LOG_OPTS $CLIENT_GC_OPTS -Dorg.jline.terminal.dumb=true"
CMD="$JAVA $SHELL_OPTS -cp $CP sqlline.SqlLine -ac
org.apache.drill.exec.client.DrillSqlLineApplication"
# The wrapper is purely for unit testing.