This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 881a4e8aa6c HDDS-15671. [JDK23] Allow using sun.misc.Unsafe (#10610)
881a4e8aa6c is described below

commit 881a4e8aa6c75511fe4ae89dff3077acfb29ed0c
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Thu Jun 25 22:46:13 2026 +0200

    HDDS-15671. [JDK23] Allow using sun.misc.Unsafe (#10610)
---
 hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh 
b/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh
index ade2b9ee5a3..15d7916226c 100755
--- a/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh
+++ b/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh
@@ -1447,6 +1447,12 @@ function ozone_set_module_access_args
   fi
 
   # populate JVM args based on java version
+  if [[ "${JAVA_MAJOR_VERSION}" -ge 23 ]]; then
+    # allow sun.misc.Unsafe until protobuf-java moves away from it
+    # see: https://github.com/protocolbuffers/protobuf/issues/20760
+    # see: https://openjdk.org/jeps/471
+    OZONE_MODULE_ACCESS_ARGS="${OZONE_MODULE_ACCESS_ARGS} 
--sun-misc-unsafe-memory-access=allow"
+  fi
   if [[ "${JAVA_MAJOR_VERSION}" -ge 17 ]]; then
     OZONE_MODULE_ACCESS_ARGS="${OZONE_MODULE_ACCESS_ARGS} --add-opens 
java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED"
     OZONE_MODULE_ACCESS_ARGS="${OZONE_MODULE_ACCESS_ARGS} --add-exports 
java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to