You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by gi...@apache.org on 2022/09/12 16:03:35 UTC

[druid] branch master updated: export com.sun.management.internal (#13068)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new eff7c64228 export com.sun.management.internal (#13068)
eff7c64228 is described below

commit eff7c6422833236bbc96ac9cf57e1c50c124d3e3
Author: Frank Chen <fr...@outlook.com>
AuthorDate: Tue Sep 13 00:03:22 2022 +0800

    export com.sun.management.internal (#13068)
---
 examples/bin/run-java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/examples/bin/run-java b/examples/bin/run-java
index 759b7db228..b0af472db8 100755
--- a/examples/bin/run-java
+++ b/examples/bin/run-java
@@ -29,6 +29,7 @@ JAVA_MAJOR="$("$JAVA_BIN" -version 2>&1 | sed -n -E 's/.* version "([^."]*).*/\1
 if [ "$JAVA_MAJOR" != "" ] && [ "$JAVA_MAJOR" -ge "17" ]
 then
   # Must disable strong encapsulation for certain packages on Java 17.
+  # The last one is required for metric emit, see https://github.com/apache/druid/issues/12312
   exec "$JAVA_BIN" \
     --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
     --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED \
@@ -37,15 +38,18 @@ then
     --add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
     --add-opens=java.base/java.io=ALL-UNNAMED \
     --add-opens=java.base/java.lang=ALL-UNNAMED \
+    --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
     "$@"
 elif [ "$JAVA_MAJOR" != "" ] && [ "$JAVA_MAJOR" -ge "11" ]
 then
-  # Parameters below are required to use datasketches-memory as a library
+  # The first 4 parameters below are required to use datasketches-memory as a library.
+  # And the last one is required for metric emit, see https://github.com/apache/druid/issues/12312
   exec "$JAVA_BIN" \
     --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED \
     --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED \
     --add-opens=java.base/java.nio=ALL-UNNAMED \
     --add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
+    --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
     "$@"
 else
   exec "$JAVA_BIN" "$@"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org