[Java] Provide default setting of io.netty.tryReflectionSetAccessible=true
- Vorherrschende Sprache
- Java
- Sterne
- 94
- Forks
- 152
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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.*
Beitragsleitfaden
Rechercherichtung
Beginne damit nachzuverfolgen, wo Arrow Java den Netty-Fehler beim Reflection-Zugriff auf JDK 9 und höher auslöst; das Issue nennt keine Quelldatei oder keinen Test. Prüfe anschließend das dokumentierte Verhalten der Eigenschaft io.netty.tryReflectionSetAccessible, verifiziere dann die Fälle, in denen sie nicht gesetzt sowie auf true und false gesetzt ist, und bestätige, dass der resultierende Fehler die vorgeschlagene Einstellung erklärt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- backend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100