Class ChunkReaderContext
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.index.readers.forward.ChunkReaderContext
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ForwardIndexReaderContext
public class ChunkReaderContext extends Object implements ForwardIndexReaderContext
Context for the chunk-based forward index readers.Information saved in the context can be used by subsequent reads as cache:
- Chunk Buffer from the previous read. Useful if the subsequent read is from the same buffer, as it avoids extra chunk decompression.
- Id for the chunk
-
-
Constructor Summary
Constructors Constructor Description ChunkReaderContext(int maxChunkSize)
-
Method Summary
Modifier and Type Method Description voidclose()ByteBuffergetChunkBuffer()intgetChunkId()voidsetChunkId(int chunkId)
-
-
-
Method Detail
-
getChunkBuffer
public ByteBuffer getChunkBuffer()
-
getChunkId
public int getChunkId()
-
setChunkId
public void setChunkId(int chunkId)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-