Class ParquetDirectByteBufferAllocator
java.lang.Object
org.apache.drill.exec.store.parquet.ParquetDirectByteBufferAllocator
- All Implemented Interfaces:
org.apache.parquet.bytes.ByteBufferAllocator
public class ParquetDirectByteBufferAllocator
extends Object
implements org.apache.parquet.bytes.ByteBufferAllocator
ByteBufferAllocator
implementation that uses Drill's BufferAllocator
to allocate and release
ByteBuffer
objects.To properly release an allocated
DrillBuf
, this class keeps track of it's corresponding ByteBuffer
that was passed to the Parquet library.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallocate
(int sz) boolean
isDirect()
void
release
(ByteBuffer byteBuffer)
-
Constructor Details
-
ParquetDirectByteBufferAllocator
-
ParquetDirectByteBufferAllocator
-
-
Method Details
-
allocate
- Specified by:
allocate
in interfaceorg.apache.parquet.bytes.ByteBufferAllocator
-
release
- Specified by:
release
in interfaceorg.apache.parquet.bytes.ByteBufferAllocator
-
isDirect
public boolean isDirect()- Specified by:
isDirect
in interfaceorg.apache.parquet.bytes.ByteBufferAllocator
-