[Java] Problem to get current reservation of JVM direct memory on macOS Big Sur
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
Start with TestReservationListener.java around testDirectReservationListener and run the Maven command shown in the report on the affected macOS/JVM setup. Inspect the java.nio.Bits field used for the direct-memory reservation and verify the test also passes in the referenced CI workflow.
Written by the indexing model from the issue text.
Description
Hi Team,
Just compiling java dataset module it compile without problems but the test related to get current reservation of JVM direct memory is failing on my local machine macOS Big Sur 11.5.2.
Command line:
mvn -Darrow.cpp.build.dir=../java-dist/lib clean install
Test code:
/**
* Get current reservation of jVM direct memory. Visible for testing.
*/
@VisibleForTesting
public long getCurrentDirectMemReservation() {
try {
final Class<?> classBits = Class.forName("java.nio.Bits");
final Field f = classBits.getDeclaredField("reservedMemory");
f.setAccessible(true);
return ((AtomicLong) f.get(null)).get();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Error message:
[ERROR] testDirectReservationListener Time elapsed: 0.028 s <<< ERROR!
java.lang.RuntimeException: java.lang.NoSuchFieldException: reservedMemory
at org.apache.arrow.dataset.jni.TestReservationListener.testDirectReservationListener(TestReservationListener.java:50)
If I changed from classBits.getDeclaredField("reservedMemory") to
classBits.getDeclaredField("RESERVED_MEMORY") all the test finished without problems. Seeing this way to obtain reserved memory on Jvm.java.
Consider: Current test on macOS finished ok on the ci workflows.
Reporter: David Dali Susanibar Arce / @davisusanibar
Note: This issue was originally created as ARROW-15834. Please see the migration documentation for further details.
- Dominant language
- Java
- Stars
- 95
- Forks
- 154
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/arrow-java
-
Type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-java#1300 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/arrow-java#1261 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-java#1236 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-java#1230 ·
-
Type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
apache/arrow-java#1205 ·
All issues in apache/arrow-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100