You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by me...@apache.org on 2023/12/12 09:43:22 UTC
(hbase) branch branch-2 updated: HBASE-28252 Add sun.net.dns and sun.net.util to the JDK11+ module exports in the hbase script (#5571)
This is an automated email from the ASF dual-hosted git repository.
meszibalu pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 879b52970f2 HBASE-28252 Add sun.net.dns and sun.net.util to the JDK11+ module exports in the hbase script (#5571)
879b52970f2 is described below
commit 879b52970f20e9c19317f3f077565d97264b43e7
Author: Istvan Toth <st...@apache.org>
AuthorDate: Tue Dec 12 10:41:40 2023 +0100
HBASE-28252 Add sun.net.dns and sun.net.util to the JDK11+ module exports in the hbase script (#5571)
Signed-off-by: Duo Zhang <zh...@apache.org>
Signed-off-by: Balazs Meszaros <me...@apache.org>
---
bin/hbase | 5 +++--
bin/hbase-config.sh | 8 ++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/bin/hbase b/bin/hbase
index e786571d623..4a5476acd13 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -496,7 +496,7 @@ add_jdk11_deps_to_classpath() {
}
add_jdk11_jvm_flags() {
- 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"
+ 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 [...]
}
add_opentelemetry_agent() {
@@ -786,7 +786,7 @@ fi
# Add lib/jdk11 jars to the classpath
if [ "${DEBUG}" = "true" ]; then
- echo "Deciding on addition of lib/jdk11 jars to the classpath"
+ echo "Deciding on addition of lib/jdk11 jars to the classpath and setting JVM module flags"
fi
addJDK11Jars=false
@@ -879,6 +879,7 @@ export CLASSPATH
if [ "${DEBUG}" = "true" ]; then
echo "classpath=${CLASSPATH}" >&2
HBASE_OPTS="${HBASE_OPTS} -Xdiag"
+ echo "HBASE_OPTS=${HBASE_OPTS}"
fi
# resolve the command arguments
diff --git a/bin/hbase-config.sh b/bin/hbase-config.sh
index 104e9a0b67c..0e8b3feed21 100644
--- a/bin/hbase-config.sh
+++ b/bin/hbase-config.sh
@@ -178,8 +178,12 @@ EOF
fi
function read_java_version() {
- properties="$("${JAVA_HOME}/bin/java" -XshowSettings:properties -version 2>&1)"
- echo "${properties}" | "${GREP}" java.runtime.version | head -1 | "${SED}" -e 's/.* = \([^ ]*\)/\1/'
+ # Avoid calling java repeatedly
+ if [ -z "$read_java_version_cached" ]; then
+ properties="$("${JAVA_HOME}/bin/java" -XshowSettings:properties -version 2>&1)"
+ read_java_version_cached="$(echo "${properties}" | "${GREP}" java.runtime.version | head -1 | "${SED}" -e 's/.* = \([^ ]*\)/\1/')"
+ fi
+ echo "$read_java_version_cached"
}
# Inspect the system properties exposed by this JVM to identify the major