apache / apache/arrow-java

[Java] Provide default setting of io.netty.tryReflectionSetAccessible=true

オープン
#274 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
Type: enhancement
主要言語
Java
スター
94
フォーク
152
平均マージ
3日 16時間
マージ済み PR(30日)
11

説明

After ARROW-3191, consumers of Arrow Java with a JDK 9 and above are required to set the JVM property "io.netty.tryReflectionSetAccessible=true" at startup, each time Arrow code is run, as documented at https://github.com/apache/arrow/tree/master/java#java-properties. Not doing this will result in the error "java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available", making Arrow unusable out-of-the-box.

This proposes to automatically set the property if not already set in the following steps:

1) check to see if the property io.netty.tryReflectionSetAccessible has been set
2) if not set, automatically set to "true"
3) else if set to "false", catch the Netty error and prepend the error message with the suggested setting of "true"

**Reporter**: [Bryan Cutler](https://issues.apache.org/jira/browse/ARROW-7223) / @BryanCutler
#### Related issues:
- [Document Arrow requirement in JDK9+](https://issues.apache.org/jira/browse/SPARK-29924) (relates to)

**Note**: *This issue was originally created as [ARROW-7223](https://issues.apache.org/jira/browse/ARROW-7223). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、JDK 9 以降で Arrow Java が Netty の reflection によるアクセス失敗をどこで発生させるのかを追跡します。この issue にはソースファイルもテストも記載されていません。次に、プロパティ io.netty.tryReflectionSetAccessible の文書化された動作を確認し、未設定、true、false の場合を検証して、結果として発生するエラーが提案された設定を説明していることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
backend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。