From 6b1c7234f7e7fd1d0b543a0513deb3f79f1af131 Mon Sep 17 00:00:00 2001 From: panbingkun <84731559@qq.com> Date: Fri, 28 Jul 2023 22:47:42 +0800 Subject: [PATCH] GH-36928: [Java] Make it run well with the netty newest version 4.1.96 (#36926) When I used `netty arrow memory 13.0.0` and `netty 4.1.96.Final` in Spark, the following error occurred, Because `netty 4.1.96.Final` version has revert some modifications, in order to ensure that `netty arrow memory 13.0.0` works well with ``netty 4.1.96.Final`` version, I suggest making similar modifications here. 1.Compilation errors are as follows: https://ci.appveyor.com/project/ApacheSoftwareFoundation/spark/builds/47657403 image 2.Some modifications have been reverted in `netty 4.1.96.Final` as follows: image image https://netty.io/news/2023/07/27/4-1-96-Final.html https://github.com/netty/netty/pull/13510 * Closes: #36928 Authored-by: panbingkun Signed-off-by: David Li --- .../src/main/java/io/netty/buffer/PooledByteBufAllocatorL.java | 2 +- java/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/memory/memory-netty/src/main/java/io/netty/buffer/PooledByteBufAllocatorL.java b/java/memory/memory-netty/src/main/java/io/netty/buffer/PooledByteBufAllocatorL.java index 870114d7db1b5..06c6669cfd162 100644 --- a/java/memory/memory-netty/src/main/java/io/netty/buffer/PooledByteBufAllocatorL.java +++ b/java/memory/memory-netty/src/main/java/io/netty/buffer/PooledByteBufAllocatorL.java @@ -161,7 +161,7 @@ public InnerAllocator() { } private UnsafeDirectLittleEndian newDirectBufferL(int initialCapacity, int maxCapacity) { - PoolArenasCache cache = threadCache(); + PoolThreadCache cache = threadCache(); PoolArena directArena = cache.directArena; if (directArena != null) { diff --git a/java/pom.xml b/java/pom.xml index 7f8de003a3355..d6b37c7df969d 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -33,7 +33,7 @@ 5.9.0 1.7.25 31.1-jre - 4.1.94.Final + 4.1.96.Final 1.56.0 3.23.1 2.15.1