From 16caf6733c893204fab2df4603c7abf0c3106bf7 Mon Sep 17 00:00:00 2001 From: Imran Rashid Date: Fri, 15 Feb 2019 16:23:26 -0600 Subject: [PATCH] [SPARK-26896] JDK 11 module adjustments for running tests This adds a JDK11 profile, just intended for running tests. It adds extra runtime arguments to the test runners to get around new module limitations. This includes: 1) removal of jaxb from java itself (used in pmml export in mllib) 2) Some reflective access which results in failures, eg. Unable to make field jdk.internal.ref.PhantomCleanable jdk.internal.ref.PhantomCleanable.prev accessible: module java.base does not "opens jdk.internal.ref" to unnamed module 3) Some reflective access which results in warnings. --- mllib/pom.xml | 15 +++++++++++++++ pom.xml | 29 +++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/mllib/pom.xml b/mllib/pom.xml index 0b17345064a71..5be2b98062e40 100644 --- a/mllib/pom.xml +++ b/mllib/pom.xml @@ -150,6 +150,21 @@ + + JDK11 + + + + javax.xml.bind + jaxb-api + + + org.glassfish.jaxb + jaxb-runtime + runtime + + + diff --git a/pom.xml b/pom.xml index cbac15f1dfad1..0f7ac4928572f 100644 --- a/pom.xml +++ b/pom.xml @@ -230,6 +230,8 @@ ${session.executionRootDirectory} 512m + + @@ -2117,7 +2119,7 @@ **/*Suite.java ${project.build.directory}/surefire-reports - -ea -Xmx4g -Xss4m -XX:ReservedCodeCacheSize=${CodeCacheSize} + -ea -Xmx3g -Xss4m -XX:ReservedCodeCacheSize=${CodeCacheSize} ${jdk11.module.args} + + javax.xml.bind + jaxb-api + 2.3.1 + + + org.glassfish.jaxb + jaxb-runtime + 2.3.1 + runtime + + + + + --add-opens java.base/jdk.internal.ref=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.net=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --illegal-access=warn + + + spark-ganglia-lgpl