Class VarByteChunkForwardIndexWriterV4
- java.lang.Object
-
- org.apache.pinot.segment.local.io.writer.impl.VarByteChunkForwardIndexWriterV4
-
- All Implemented Interfaces:
Closeable,AutoCloseable,VarByteChunkWriter
@NotThreadSafe public class VarByteChunkForwardIndexWriterV4 extends Object implements VarByteChunkWriter
Chunk-based raw (non-dictionary-encoded) forward index writer where each chunk contains variable number of docs, and the entries are variable length.The layout of the file is as follows:
- Header Section
- File format version (int)
- Target decompressed chunk size (int)
- Compression type enum value (int)
- Start offset of chunk data (int)
- Data header (for each chunk)
- First docId in the chunk (int), where MSB is used to mark huge chunk
- Start offset of the chunk (unsigned int)
- Individual Chunks
- Regular chunk
- Header Section: start offsets (stored as int) of the entry within the data section
- Data Section
- Huge chunk: contains one single value
- Regular chunk
-
-
Field Summary
Fields Modifier and Type Field Description static intVERSION
-
Constructor Summary
Constructors Constructor Description VarByteChunkForwardIndexWriterV4(File file, ChunkCompressionType compressionType, int chunkSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidputBigDecimal(BigDecimal bigDecimal)voidputBytes(byte[] bytes)voidputBytesMV(byte[][] values)voidputString(String string)voidputStringMV(String[] values)
-
-
-
Field Detail
-
VERSION
public static final int VERSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VarByteChunkForwardIndexWriterV4
public VarByteChunkForwardIndexWriterV4(File file, ChunkCompressionType compressionType, int chunkSize) throws IOException
- Throws:
IOException
-
-
Method Detail
-
putBigDecimal
public void putBigDecimal(BigDecimal bigDecimal)
- Specified by:
putBigDecimalin interfaceVarByteChunkWriter
-
putString
public void putString(String string)
- Specified by:
putStringin interfaceVarByteChunkWriter
-
putBytes
public void putBytes(byte[] bytes)
- Specified by:
putBytesin interfaceVarByteChunkWriter
-
putStringMV
public void putStringMV(String[] values)
- Specified by:
putStringMVin interfaceVarByteChunkWriter
-
putBytesMV
public void putBytesMV(byte[][] values)
- Specified by:
putBytesMVin interfaceVarByteChunkWriter
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-