You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/10/04 03:51:03 UTC

[GitHub] [spark] h-vetinari commented on a change in pull request #34153: [SPARK-36796][BUILD][CORE][SQL] Pass all `sql/core` and dependent modules UTs use Maven with JDK 17

h-vetinari commented on a change in pull request #34153:
URL: https://github.com/apache/spark/pull/34153#discussion_r721017086



##########
File path: core/src/main/scala/org/apache/spark/util/JavaModuleUtils.scala
##########
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.util
+
+import scala.collection.mutable
+
+import org.apache.commons.lang3.{JavaVersion, SystemUtils}
+
+import org.apache.spark.SparkConf
+import org.apache.spark.internal.config.{DRIVER_JAVA_OPTIONS, EXECUTOR_JAVA_OPTIONS, OptionalConfigEntry}
+
+object JavaModuleUtils {
+
+  private val javaModuleOptions = Set(
+    "--add-opens=java.base/java.lang=ALL-UNNAMED",

Review comment:
       > that's not great, as most users won't know or want to set this up in their own execution. Is there any other workaround, or does JDK 17 now enforce this restriction?
   
   The long-term solution is to not rely on Java-internal APIs anymore; they will be changed/removed more frequently, and with less notice, in the future; there's now an [explicit](https://www.youtube.com/watch?v=LgnZ-wp3D80&t=1023s) "please, do not use them". In other words, `--add-opens` is a stop gap solution only.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org