[KYUUBI #6456] Opens jdk.internal.ref
# 🔍 Description This PR follows SPARK-45508 to modify the JVM args by adding `--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED`, without this arg should not affect Spark engines as `spark-submit` will handle that by launching a sub-process and adding those JVM args. The change benefits Spark in-process cases in UT, a little. This PR also renames maven properties `maven.plugin.surefire.argLine` back to `extraJavaTestArgs` as it is used in both surefire and scalatest plugins, and makes it always takes effect instead of only JDK 17, then we don't need a copy when adding a new profile `java-21` ## Types of changes 🔖 - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 Pass GHA. --- # Checklist 📝 - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6456 from pan3793/add-open. Closes #6456 ef7310a2e [Cheng Pan] add opens Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
parent
03dcedd89e
commit
5623ead6bd
@ -78,6 +78,7 @@ KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/java.nio=ALL-UNNAMED"
|
|||||||
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
|
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
|
||||||
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
||||||
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED"
|
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED"
|
||||||
|
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED"
|
||||||
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
|
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
|
||||||
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/sun.nio.cs=ALL-UNNAMED"
|
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/sun.nio.cs=ALL-UNNAMED"
|
||||||
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/sun.security.action=ALL-UNNAMED"
|
KYUUBI_JAVA_OPTS="$KYUUBI_JAVA_OPTS --add-opens=java.base/sun.security.action=ALL-UNNAMED"
|
||||||
@ -97,6 +98,7 @@ KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/java.nio=ALL-U
|
|||||||
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
|
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
|
||||||
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
||||||
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED"
|
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED"
|
||||||
|
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED"
|
||||||
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
|
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
|
||||||
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/sun.nio.cs=ALL-UNNAMED"
|
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/sun.nio.cs=ALL-UNNAMED"
|
||||||
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/sun.security.action=ALL-UNNAMED"
|
KYUUBI_CTL_JAVA_OPTS="$KYUUBI_CTL_JAVA_OPTS --add-opens=java.base/sun.security.action=ALL-UNNAMED"
|
||||||
|
|||||||
44
pom.xml
44
pom.xml
@ -238,7 +238,6 @@
|
|||||||
<maven.plugin.scalatest.debug.enabled>false</maven.plugin.scalatest.debug.enabled>
|
<maven.plugin.scalatest.debug.enabled>false</maven.plugin.scalatest.debug.enabled>
|
||||||
<maven.plugin.spotless.version>2.30.0</maven.plugin.spotless.version>
|
<maven.plugin.spotless.version>2.30.0</maven.plugin.spotless.version>
|
||||||
<maven.plugin.surefire.version>3.2.1</maven.plugin.surefire.version>
|
<maven.plugin.surefire.version>3.2.1</maven.plugin.surefire.version>
|
||||||
<maven.plugin.surefire.argLine></maven.plugin.surefire.argLine>
|
|
||||||
<maven.plugin.jacoco.version>0.8.11</maven.plugin.jacoco.version>
|
<maven.plugin.jacoco.version>0.8.11</maven.plugin.jacoco.version>
|
||||||
<maven.plugin.scalastyle.version>1.0.0</maven.plugin.scalastyle.version>
|
<maven.plugin.scalastyle.version>1.0.0</maven.plugin.scalastyle.version>
|
||||||
<maven.plugin.shade.version>3.5.2</maven.plugin.shade.version>
|
<maven.plugin.shade.version>3.5.2</maven.plugin.shade.version>
|
||||||
@ -269,6 +268,26 @@
|
|||||||
<distMgmtSnapshotsName>Apache Development Snapshot Repository</distMgmtSnapshotsName>
|
<distMgmtSnapshotsName>Apache Development Snapshot Repository</distMgmtSnapshotsName>
|
||||||
<distMgmtSnapshotsUrl>https://repository.apache.org/content/repositories/snapshots</distMgmtSnapshotsUrl>
|
<distMgmtSnapshotsUrl>https://repository.apache.org/content/repositories/snapshots</distMgmtSnapshotsUrl>
|
||||||
|
|
||||||
|
<extraJavaTestArgs>-XX:+IgnoreUnrecognizedVMOptions
|
||||||
|
--add-opens=java.base/java.lang=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/java.io=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/java.net=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/java.nio=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/java.util=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/sun.nio.cs=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/sun.security.action=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/sun.security.tools.keytool=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/sun.security.x509=ALL-UNNAMED
|
||||||
|
--add-opens=java.base/sun.util.calendar=ALL-UNNAMED
|
||||||
|
-Djdk.reflect.useDirectMethodHandle=false
|
||||||
|
-Dio.netty.tryReflectionSetAccessible=true</extraJavaTestArgs>
|
||||||
|
|
||||||
<debugArgLine>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</debugArgLine>
|
<debugArgLine>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</debugArgLine>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@ -1413,7 +1432,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<skipTests>true</skipTests>
|
<skipTests>true</skipTests>
|
||||||
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
|
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
|
||||||
<argLine>${maven.plugin.surefire.argLine}</argLine>
|
<argLine>${extraJavaTestArgs}</argLine>
|
||||||
<environmentVariables>
|
<environmentVariables>
|
||||||
<KYUUBI_WORK_DIR_ROOT>${project.build.directory}/work</KYUUBI_WORK_DIR_ROOT>
|
<KYUUBI_WORK_DIR_ROOT>${project.build.directory}/work</KYUUBI_WORK_DIR_ROOT>
|
||||||
</environmentVariables>
|
</environmentVariables>
|
||||||
@ -1441,7 +1460,7 @@
|
|||||||
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
|
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
|
||||||
<junitxml>.</junitxml>
|
<junitxml>.</junitxml>
|
||||||
<filereports>TestSuite.txt</filereports>
|
<filereports>TestSuite.txt</filereports>
|
||||||
<argLine>${maven.plugin.surefire.argLine}</argLine>
|
<argLine>${extraJavaTestArgs}</argLine>
|
||||||
<environmentVariables>
|
<environmentVariables>
|
||||||
<KYUUBI_WORK_DIR_ROOT>${project.build.directory}/work</KYUUBI_WORK_DIR_ROOT>
|
<KYUUBI_WORK_DIR_ROOT>${project.build.directory}/work</KYUUBI_WORK_DIR_ROOT>
|
||||||
</environmentVariables>
|
</environmentVariables>
|
||||||
@ -1892,24 +1911,7 @@
|
|||||||
<maven.compiler.source></maven.compiler.source>
|
<maven.compiler.source></maven.compiler.source>
|
||||||
<maven.compiler.target></maven.compiler.target>
|
<maven.compiler.target></maven.compiler.target>
|
||||||
<maven.compiler.release>${java.version}</maven.compiler.release>
|
<maven.compiler.release>${java.version}</maven.compiler.release>
|
||||||
<maven.plugin.surefire.argLine>-XX:+IgnoreUnrecognizedVMOptions
|
<minimalJavaBuildVersion>${java.version}</minimalJavaBuildVersion>
|
||||||
--add-opens=java.base/java.lang=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/java.io=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/java.net=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/java.nio=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/java.util=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/sun.nio.cs=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/sun.security.action=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/sun.security.tools.keytool=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/sun.security.x509=ALL-UNNAMED
|
|
||||||
--add-opens=java.base/sun.util.calendar=ALL-UNNAMED
|
|
||||||
-Djdk.reflect.useDirectMethodHandle=false
|
|
||||||
-Dio.netty.tryReflectionSetAccessible=true</maven.plugin.surefire.argLine>
|
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user