apache / apache/arrow-java

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

Aperta
#274 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Type: enhancement
Lingua principale
Java
Stelle
94
Fork
152
Merge medio
3g 16h
PR unite (30g)
11

Descrizione

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.*

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia tracciando dove Arrow Java attiva il fallimento dell’accesso tramite reflection di Netty su JDK 9 e versioni successive; l’issue non indica alcun file sorgente né alcun test. Esamina quindi il comportamento documentato della proprietà io.netty.tryReflectionSetAccessible, verifica i casi in cui non è impostata, è impostata su true ed è impostata su false, e conferma che l’errore risultante spiega l’impostazione suggerita.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
backend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.