Skip to content

Commit

Permalink
HBASE-28261 Sync jvm11 module flags from hbase-surefire.jdk11.flags t…
Browse files Browse the repository at this point in the history
…o bin/hbase (apache#5610)

Signed-off-by: Nihal Jain <[email protected]>
Signed-off-by: Peter Somogyi <[email protected]>
(cherry picked from commit 0916c72)
  • Loading branch information
stoty authored and petersomogyi committed Jan 9, 2024
1 parent b361694 commit cb82149
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/hbase
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,8 @@ 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.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"
# Keep in sync with hbase-surefire.jdk11.flags in the root pom.xml
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"
}

#Add the development env class path stuff
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,11 @@
-Xms${surefire.cygwinXms} -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true
"-Djava.library.path=${hadoop.library.path};${java.library.path}"
-Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level=advanced</hbase-surefire.cygwin-argLine>
<!-- Keep these options in sync with add_jdk11_jvm_flags() in bin/hbase.
Currently, all of these options are known to be required by HBase, and not the test cases -->
<hbase-surefire.jdk11.flags>-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
Expand All @@ -719,6 +722,8 @@
--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</hbase-surefire.jdk11.flags>
<!-- java.base/jdk.internal.util.random=ALL-UNNAMED is required by the test code, so we do not
need this in bin/hbase -->
<hbase-surefire.jdk17.flags>--add-opens java.base/jdk.internal.util.random=ALL-UNNAMED</hbase-surefire.jdk17.flags>
<!-- Surefire argLine defaults to Linux, cygwin argLine is used in the os.windows profile -->
<argLine>${hbase-surefire.argLine} @{jacocoArgLine}</argLine>
Expand Down

0 comments on commit cb82149

Please sign in to comment.