raulcd commented on code in PR #39502:
URL: https://github.com/apache/arrow/pull/39502#discussion_r1445785931
##########
dev/archery/archery/integration/tester_java.py:
##########
@@ -83,13 +82,32 @@ def setup_jpype():
import jpype
jar_path = f"{_ARROW_TOOLS_JAR}:{_ARROW_C_DATA_JAR}"
# XXX Didn't manage to tone down the logging level here (DEBUG -> INFO)
+ java_opts = _JAVA_OPTS[:]
+ proc = subprocess.run(
+ ['java', '--add-opens'],
+ stderr=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ text=True)
+ if 'Unrecognized option: --add-opens' not in proc.stderr:
+ # Java 9+
+ java_opts.append('--add-opens=java.base/java.nio=ALL-UNNAMED')
jpype.startJVM(jpype.getDefaultJVMPath(),
"-Djava.class.path=" + jar_path,
# This flag is too heavy for IPC and Flight tests
"-Darrow.memory.debug.allocator=true",
# Reduce internal use of signals by the JVM
"-Xrs",
- *_JAVA_OPTS)
+ *java_opts)
+
+
[email protected]_cache
Review Comment:
I did this so we just do the import once and cache the result. In my opinion
my approach is clearer instead of reusing
`C_DATA_SCHEMA_EXPORTER` just get the result of `_enable_c_data_tests` but I
am ok with both if you prefer your suggested approach. I'll let you merge feel
free to push your change :)
--
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]