Describe the bug
some tests fail when the repo is build using JDK11
Steps/Code to reproduce bug
JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64 mvn clean verify -Dcuda.version=cuda11 -Dtests="test GpuArrowColumnarBatchBuilder retains reference of ArrowBuf"
GpuCoalesceBatchesSuite:
- test GpuArrowColumnarBatchBuilder retains reference of ArrowBuf *** FAILED ***
java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.<init>(long, int) not available
at io.netty.util.internal.PlatformDependent.directBuffer(PlatformDependent.java:490)
at io.netty.buffer.NettyArrowBuf.getDirectBuffer(NettyArrowBuf.java:243)
at io.netty.buffer.NettyArrowBuf.nioBuffer(NettyArrowBuf.java:233)
at io.netty.buffer.NettyArrowBuf.nioBuffer(NettyArrowBuf.java:223)
at io.netty.buffer.ArrowBuf.nioBuffer(ArrowBuf.java:241)
at com.nvidia.spark.rapids.shims.spark300.Spark300Shims.getArrowDataBuf(Spark300Shims.scala:486)
at com.nvidia.spark.rapids.HostColumnarToGpu$.$anonfun$arrowColumnarCopy$1(HostColumnarToGpu.scala:96)
at com.nvidia.spark.rapids.HostColumnarToGpu$.getBufferAndAddReference$1(HostColumnarToGpu.scala:90)
at com.nvidia.spark.rapids.HostColumnarToGpu$.arrowColumnarCopy(HostColumnarToGpu.scala:96)
at com.nvidia.spark.rapids.HostColumnarToGpu.arrowColumnarCopy(HostColumnarToGpu.scala)
For Python 3.9, Arrow optimization and pandas UDFs might not work due to the supported Python versions in Apache Arrow. Please refer to the latest Python Compatibility page. For Java 11, -Dio.netty.tryReflectionSetAccessible=true is required additionally for Apache Arrow library. This prevents java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available when Apache Arrow uses Netty internally.
Environment details (please complete the following information)
Environment location: building locally on an Ubuntu 18.04 desktop
$ /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.18.04)
OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
Describe the bug some tests fail when the repo is build using JDK11
Steps/Code to reproduce bug
Expected behavior
JDK 11 is supported with Spark 3 with the caveat, h/t @pxLi
Environment details (please complete the following information)
Additional context Related to #2088