Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7223

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Java
    • None

    Description

      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"

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bryanc Bryan Cutler
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: