[Java] Problem to get current reservation of JVM direct memory on macOS Big Sur
まだ誰も着手していません。
評価
調査の方向性
TestReservationListener.java の testDirectReservationListener 付近から始め、報告に示されている Maven コマンドを影響を受ける macOS/JVM セットアップで実行します。ダイレクトメモリの予約に使用される 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日 16時間
- マージ済み PR(30日)
- 9
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/arrow-java のほかの issue
-
Type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/arrow-java#1300 ·
-
難易度 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 ·
apache/arrow-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
infinispan/infinispan#18150 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
opensearch-project/k-NN#3597 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100