File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ add_jdk11_deps_to_classpath() {
496496}
497497
498498add_jdk11_jvm_flags () {
499- HBASE_OPTS=" $HBASE_OPTS -Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true --add-modules jdk.unsupported --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED"
499+ HBASE_OPTS=" $HBASE_OPTS -Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true --add-modules jdk.unsupported --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-exports java.base/sun.net.dns=ALL-UNNAMED --add-exports java.base/sun.net.util=ALL-UNNAMED "
500500}
501501
502502add_opentelemetry_agent () {
786786# Add lib/jdk11 jars to the classpath
787787
788788if [ " ${DEBUG} " = " true" ]; then
789- echo " Deciding on addition of lib/jdk11 jars to the classpath"
789+ echo " Deciding on addition of lib/jdk11 jars to the classpath and setting JVM module flags "
790790fi
791791
792792addJDK11Jars=false
@@ -879,6 +879,7 @@ export CLASSPATH
879879if [ " ${DEBUG} " = " true" ]; then
880880 echo " classpath=${CLASSPATH} " >&2
881881 HBASE_OPTS=" ${HBASE_OPTS} -Xdiag"
882+ echo " HBASE_OPTS=${HBASE_OPTS} "
882883fi
883884
884885# resolve the command arguments
Original file line number Diff line number Diff line change 178178fi
179179
180180function read_java_version() {
181- properties=" $( " ${JAVA_HOME} /bin/java" -XshowSettings:properties -version 2>&1 ) "
182- echo " ${properties} " | " ${GREP} " java.runtime.version | head -1 | " ${SED} " -e ' s/.* = \([^ ]*\)/\1/'
181+ # Avoid calling java repeatedly
182+ if [ -z " $read_java_version_cached " ]; then
183+ properties=" $( " ${JAVA_HOME} /bin/java" -XshowSettings:properties -version 2>&1 ) "
184+ read_java_version_cached=" $( echo " ${properties} " | " ${GREP} " java.runtime.version | head -1 | " ${SED} " -e ' s/.* = \([^ ]*\)/\1/' ) "
185+ fi
186+ echo " $read_java_version_cached "
183187}
184188
185189# Inspect the system properties exposed by this JVM to identify the major
You can’t perform that action at this time.
0 commit comments