File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -491,7 +491,7 @@ add_jdk11_deps_to_classpath() {
491
491
}
492
492
493
493
add_jdk11_jvm_flags () {
494
- 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"
494
+ 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 "
495
495
}
496
496
497
497
add_opentelemetry_agent () {
749
749
# Add lib/jdk11 jars to the classpath
750
750
751
751
if [ " ${DEBUG} " = " true" ]; then
752
- echo " Deciding on addition of lib/jdk11 jars to the classpath"
752
+ echo " Deciding on addition of lib/jdk11 jars to the classpath and setting JVM module flags "
753
753
fi
754
754
755
755
addJDK11Jars=false
@@ -842,6 +842,7 @@ export CLASSPATH
842
842
if [ " ${DEBUG} " = " true" ]; then
843
843
echo " classpath=${CLASSPATH} " >&2
844
844
HBASE_OPTS=" ${HBASE_OPTS} -Xdiag"
845
+ echo " HBASE_OPTS=${HBASE_OPTS} "
845
846
fi
846
847
847
848
# resolve the command arguments
Original file line number Diff line number Diff line change 178
178
fi
179
179
180
180
function 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 "
183
187
}
184
188
185
189
# Inspect the system properties exposed by this JVM to identify the major
You can’t perform that action at this time.
0 commit comments