Skip to content

Commit 0916c72

Browse files
authored
HBASE-28261 Sync jvm11 module flags from hbase-surefire.jdk11.flags to bin/hbase (#5610)
Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Peter Somogyi <[email protected]>
1 parent 71cecb0 commit 0916c72

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

bin/hbase

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,8 @@ add_jdk11_deps_to_classpath() {
496496
}
497497

498498
add_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.io=ALL-UNNAMED --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"
499+
# Keep in sync with hbase-surefire.jdk11.flags in the root pom.xml
500+
HBASE_OPTS="$HBASE_OPTS -Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true --add-modules jdk.unsupported --add-opens java.base/java.io=ALL-UNNAMED --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-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=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"
500501
}
501502

502503
add_opentelemetry_agent() {

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,11 @@
971971
"-Djava.library.path=${hadoop.library.path};${java.library.path}"
972972
-Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level=advanced
973973
-Dio.opentelemetry.context.enableStrictContext=true</hbase-surefire.cygwin-argLine>
974+
<!-- Keep these options in sync with add_jdk11_jvm_flags() in bin/hbase.
975+
Currently, all of these options are known to be required by HBase, and not the test cases -->
974976
<hbase-surefire.jdk11.flags>-Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true
975977
--add-modules jdk.unsupported
978+
--add-opens java.base/java.io=ALL-UNNAMED
976979
--add-opens java.base/java.nio=ALL-UNNAMED
977980
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
978981
--add-opens java.base/java.lang=ALL-UNNAMED
@@ -984,6 +987,8 @@
984987
--add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED
985988
--add-exports java.base/sun.net.dns=ALL-UNNAMED
986989
--add-exports java.base/sun.net.util=ALL-UNNAMED</hbase-surefire.jdk11.flags>
990+
<!-- java.base/jdk.internal.util.random=ALL-UNNAMED is required by the test code, so we do not
991+
need this in bin/hbase -->
987992
<hbase-surefire.jdk17.flags>--add-opens java.base/jdk.internal.util.random=ALL-UNNAMED</hbase-surefire.jdk17.flags>
988993
<!-- Surefire argLine defaults to Linux, cygwin argLine is used in the os.windows profile -->
989994
<argLine>${hbase-surefire.argLine} @{jacocoArgLine}</argLine>

0 commit comments

Comments
 (0)