[Java] Problem to get current reservation of JVM direct memory on macOS Big Sur
还没有人认领这个 Issue。
评估
调研方向
从 TestReservationListener.java 中 testDirectReservationListener 附近开始,并在受影响的 macOS/JVM 设置上运行报告中显示的 Maven 命令。检查用于直接内存预留的 java.nio.Bits 字段,并验证测试在所引用的 CI 工作流中也能通过。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Java
- 星标
- 95
- 派生
- 154
- 平均合并
- 2 天 10 小时
- 30 天内合并 PR
- 11
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/arrow-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
apache/arrow-java#1261 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
apache/arrow-java#1236 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
apache/arrow-java#1230 ·
-
Type: bug
难度 2/5 1-3 小时 新手友好度 85/100
apache/arrow-java#1205 ·
-
Type: bug
难度 2/5 1-3 小时 新手友好度 68/100
apache/arrow-java#1196 · 1 条评论 ·
查看 apache/arrow-java 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
-
bug frontend maui-pilot
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 76/100
objectionary/eo-graphs#74 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 65/100