Skip to content

Commit e8c85f1

Browse files
stotypetersomogyi
authored andcommitted
HBASE-28261 Sync jvm11 module flags from hbase-surefire.jdk11.flags to bin/hbase (#5610)
Signed-off-by: Nihal Jain <nihaljain@apache.org> Signed-off-by: Peter Somogyi <psomogyi@apache.org> (cherry picked from commit 0916c72)
1 parent 4dc1df1 commit e8c85f1

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
@@ -491,7 +491,8 @@ add_jdk11_deps_to_classpath() {
491491
}
492492

493493
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.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"
494+
# Keep in sync with hbase-surefire.jdk11.flags in the root pom.xml
495+
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"
495496
}
496497

497498
add_opentelemetry_agent() {

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,11 @@
719719
"-Djava.library.path=${hadoop.library.path};${java.library.path}"
720720
-Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level=advanced
721721
-Dio.opentelemetry.context.enableStrictContext=true</hbase-surefire.cygwin-argLine>
722+
<!-- Keep these options in sync with add_jdk11_jvm_flags() in bin/hbase.
723+
Currently, all of these options are known to be required by HBase, and not the test cases -->
722724
<hbase-surefire.jdk11.flags>-Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true
723725
--add-modules jdk.unsupported
726+
--add-opens java.base/java.io=ALL-UNNAMED
724727
--add-opens java.base/java.nio=ALL-UNNAMED
725728
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
726729
--add-opens java.base/java.lang=ALL-UNNAMED
@@ -732,6 +735,8 @@
732735
--add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED
733736
--add-exports java.base/sun.net.dns=ALL-UNNAMED
734737
--add-exports java.base/sun.net.util=ALL-UNNAMED</hbase-surefire.jdk11.flags>
738+
<!-- java.base/jdk.internal.util.random=ALL-UNNAMED is required by the test code, so we do not
739+
need this in bin/hbase -->
735740
<hbase-surefire.jdk17.flags>--add-opens java.base/jdk.internal.util.random=ALL-UNNAMED</hbase-surefire.jdk17.flags>
736741
<!-- Surefire argLine defaults to Linux, cygwin argLine is used in the os.windows profile -->
737742
<argLine>${hbase-surefire.argLine} @{jacocoArgLine}</argLine>

0 commit comments

Comments
 (0)