singhpk234 commented on code in PR #7391:
URL: https://github.com/apache/iceberg/pull/7391#discussion_r1173200067
##########
build.gradle:
##########
@@ -715,6 +735,11 @@ project(':iceberg-parquet') {
}
project(':iceberg-arrow') {
+ test {
+ if (JavaVersion.current() == JavaVersion.VERSION_17) {
+ jvmArgs += ["-Xmx1024m", "-XX:+IgnoreUnrecognizedVMOptions",
"--add-opens", "java.base/java.lang.invoke=ALL-UNNAMED", "--add-opens",
"java.base/java.io=ALL-UNNAMED", "--add-opens",
"java.base/java.lang.reflect=ALL-UNNAMED", "--add-opens",
"java.base/java.lang=ALL-UNNAMED", "--add-opens",
"java.base/java.math=ALL-UNNAMED", "--add-opens",
"java.base/java.net=ALL-UNNAMED", "--add-opens",
"java.base/java.nio=ALL-UNNAMED", "--add-opens",
"java.base/java.text=ALL-UNNAMED", "--add-opens",
"java.base/java.time=ALL-UNNAMED", "--add-opens",
"java.base/java.util.concurrent.atomic=ALL-UNNAMED", "--add-opens",
"java.base/java.util.concurrent=ALL-UNNAMED", "--add-opens",
"java.base/java.util.regex=ALL-UNNAMED", "--add-opens",
"java.base/java.util=ALL-UNNAMED", "--add-opens",
"java.base/jdk.internal.ref=ALL-UNNAMED", "--add-opens",
"java.base/jdk.internal.reflect=ALL-UNNAMED", "--add-opens",
"java.sql/java.sql=ALL-UNNAMED"]
Review Comment:
Arrow test were failing without these flags, for ex:
```
org.apache.iceberg.arrow.vectorized.ArrowReaderTest >
testHasNextIsIdempotent FAILED
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.arrow.memory.util.MemoryUtil
at org.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:138)
... 16 more
Caused by:
java.lang.reflect.InaccessibleObjectException: Unable to make
field long java.nio.Buffer.address accessible: module java.base does not "opens
java.nio" to unnamed module @99e937b
```
hence it required jdk flags like `--add-opens=java.base/java.io=ALL-UNNAMED`
hence added the same here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]