Class SingleValueVarByteRawIndexCreator
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.creator.impl.fwd.SingleValueVarByteRawIndexCreator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ForwardIndexCreator
public class SingleValueVarByteRawIndexCreator extends Object implements ForwardIndexCreator
Forward index creator for raw (non-dictionary-encoded) single-value column of variable length data type (BIG_DECIMAL, STRING, BYTES).
-
-
Constructor Summary
Constructors Constructor Description SingleValueVarByteRawIndexCreator(File baseIndexDir, ChunkCompressionType compressionType, String column, int totalDocs, FieldSpec.DataType valueType, int maxLength)Create a var-byte raw index creator for the given columnSingleValueVarByteRawIndexCreator(File baseIndexDir, ChunkCompressionType compressionType, String column, int totalDocs, FieldSpec.DataType valueType, int maxLength, boolean deriveNumDocsPerChunk, int writerVersion)Create a var-byte raw index creator for the given column
-
Method Summary
Modifier and Type Method Description voidclose()static intgetNumDocsPerChunk(int lengthOfLongestEntry)FieldSpec.DataTypegetValueType()booleanisDictionaryEncoded()booleanisSingleValue()voidputBigDecimal(BigDecimal value)voidputBytes(byte[] value)voidputString(String value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.segment.spi.index.creator.ForwardIndexCreator
putBytesMV, putDictId, putDictIdMV, putDouble, putDoubleMV, putFloat, putFloatMV, putInt, putIntMV, putLong, putLongMV, putStringMV
-
-
-
-
Constructor Detail
-
SingleValueVarByteRawIndexCreator
public SingleValueVarByteRawIndexCreator(File baseIndexDir, ChunkCompressionType compressionType, String column, int totalDocs, FieldSpec.DataType valueType, int maxLength) throws IOException
Create a var-byte raw index creator for the given column- Parameters:
baseIndexDir- Index directorycompressionType- Type of compression to usecolumn- Name of column to indextotalDocs- Total number of documents to indexvalueType- Type of the valuesmaxLength- length of longest entry (in bytes)- Throws:
IOException
-
SingleValueVarByteRawIndexCreator
public SingleValueVarByteRawIndexCreator(File baseIndexDir, ChunkCompressionType compressionType, String column, int totalDocs, FieldSpec.DataType valueType, int maxLength, boolean deriveNumDocsPerChunk, int writerVersion) throws IOException
Create a var-byte raw index creator for the given column- Parameters:
baseIndexDir- Index directorycompressionType- Type of compression to usecolumn- Name of column to indextotalDocs- Total number of documents to indexvalueType- Type of the valuesmaxLength- length of longest entry (in bytes)deriveNumDocsPerChunk- true if writer should auto-derive the number of rows per chunkwriterVersion- writer format version- Throws:
IOException
-
-
Method Detail
-
getNumDocsPerChunk
public static int getNumDocsPerChunk(int lengthOfLongestEntry)
-
isDictionaryEncoded
public boolean isDictionaryEncoded()
- Specified by:
isDictionaryEncodedin interfaceForwardIndexCreator
-
isSingleValue
public boolean isSingleValue()
- Specified by:
isSingleValuein interfaceForwardIndexCreator
-
getValueType
public FieldSpec.DataType getValueType()
- Specified by:
getValueTypein interfaceForwardIndexCreator
-
putBigDecimal
public void putBigDecimal(BigDecimal value)
- Specified by:
putBigDecimalin interfaceForwardIndexCreator
-
putString
public void putString(String value)
- Specified by:
putStringin interfaceForwardIndexCreator
-
putBytes
public void putBytes(byte[] value)
- Specified by:
putBytesin interfaceForwardIndexCreator
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-