Class AllocationManagerShim
java.lang.Object
org.elasticsearch.xpack.esql.arrow.AllocationManagerShim
- All Implemented Interfaces:
org.apache.arrow.memory.AllocationManager.Factory
public class AllocationManagerShim
extends Object
implements org.apache.arrow.memory.AllocationManager.Factory
An Arrow memory allocation manager that always fails.
We don't actually use Arrow's memory manager as we stream dataframe buffers directly from ESQL blocks.
But Arrow won't initialize properly unless it has one (and requires either the arrow-memory-netty or arrow-memory-unsafe libraries).
It also does some fancy classpath scanning and calls to setAccessible which will be rejected by the security manager.
So we configure an allocation manager that will fail on any attempt to allocate memory.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AllocationManagerShim
public AllocationManagerShim()
-
-
Method Details
-
init
public static void init()Initialize the Arrow memory allocation manager shim. -
create
public org.apache.arrow.memory.AllocationManager create(org.apache.arrow.memory.BufferAllocator accountingAllocator, long size) - Specified by:
createin interfaceorg.apache.arrow.memory.AllocationManager.Factory
-
empty
public org.apache.arrow.memory.ArrowBuf empty()- Specified by:
emptyin interfaceorg.apache.arrow.memory.AllocationManager.Factory
-