Class StringOffHeapMutableDictionary
- java.lang.Object
-
- org.apache.pinot.segment.local.realtime.impl.dictionary.BaseOffHeapMutableDictionary
-
- org.apache.pinot.segment.local.realtime.impl.dictionary.StringOffHeapMutableDictionary
-
- All Implemented Interfaces:
Closeable,AutoCloseable,MutableDictionary,Dictionary
public class StringOffHeapMutableDictionary extends BaseOffHeapMutableDictionary
-
-
Field Summary
-
Fields inherited from interface org.apache.pinot.segment.spi.index.reader.Dictionary
NULL_VALUE_INDEX
-
-
Constructor Summary
Constructors Constructor Description StringOffHeapMutableDictionary(int estimatedCardinality, int maxOverflowHashSize, PinotDataBufferMemoryManager memoryManager, String allocationContext, int avgStringLen)
-
Method Summary
Modifier and Type Method Description intcompare(int dictId1, int dictId2)voiddoClose()protected booleanequalsValueAt(int dictId, Object value, byte[] serializedValue)Stringget(int dictId)intgetAvgValueSize()BigDecimalgetBigDecimalValue(int dictId)byte[]getBytesValue(int dictId)it.unimi.dsi.fastutil.ints.IntSetgetDictIdsInRange(String lower, String upper, boolean includeLower, boolean includeUpper)doublegetDoubleValue(int dictId)floatgetFloatValue(int dictId)intgetIntValue(int dictId)longgetLongValue(int dictId)StringgetMaxVal()StringgetMinVal()String[]getSortedValues()StringgetStringValue(int dictId)longgetTotalOffHeapMemUsed()FieldSpec.DataTypegetValueType()intindex(Object value)int[]index(Object[] values)intindexOf(String stringValue)protected voidsetValue(int dictId, Object value, byte[] serializedValue)-
Methods inherited from class org.apache.pinot.segment.local.realtime.impl.dictionary.BaseOffHeapMutableDictionary
close, getDictId, getNumberOfHeapBuffersUsed, getNumberOfOveflowValues, getOffHeapMemUsed, indexValue, init, length, nearestPowerOf2
-
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.reader.Dictionary
getByteArrayValue, getInternal, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, readBigDecimalValues, readBytesValues, readDoubleValues, readFloatValues, readIntValues, readLongValues, readStringValues
-
Methods inherited from interface org.apache.pinot.segment.spi.index.mutable.MutableDictionary
insertionIndexOf, isSorted
-
-
-
-
Constructor Detail
-
StringOffHeapMutableDictionary
public StringOffHeapMutableDictionary(int estimatedCardinality, int maxOverflowHashSize, PinotDataBufferMemoryManager memoryManager, String allocationContext, int avgStringLen)
-
-
Method Detail
-
index
public int index(Object value)
-
index
public int[] index(Object[] values)
-
compare
public int compare(int dictId1, int dictId2)
-
getDictIdsInRange
public it.unimi.dsi.fastutil.ints.IntSet getDictIdsInRange(String lower, String upper, boolean includeLower, boolean includeUpper)
-
getMinVal
public String getMinVal()
-
getMaxVal
public String getMaxVal()
-
getSortedValues
public String[] getSortedValues()
-
getValueType
public FieldSpec.DataType getValueType()
-
indexOf
public int indexOf(String stringValue)
-
get
public String get(int dictId)
-
getIntValue
public int getIntValue(int dictId)
-
getLongValue
public long getLongValue(int dictId)
-
getFloatValue
public float getFloatValue(int dictId)
-
getDoubleValue
public double getDoubleValue(int dictId)
-
getBigDecimalValue
public BigDecimal getBigDecimalValue(int dictId)
-
getStringValue
public String getStringValue(int dictId)
-
getBytesValue
public byte[] getBytesValue(int dictId)
-
setValue
protected void setValue(int dictId, Object value, byte[] serializedValue)- Specified by:
setValuein classBaseOffHeapMutableDictionary
-
equalsValueAt
protected boolean equalsValueAt(int dictId, Object value, byte[] serializedValue)- Specified by:
equalsValueAtin classBaseOffHeapMutableDictionary
-
getAvgValueSize
public int getAvgValueSize()
- Specified by:
getAvgValueSizein classBaseOffHeapMutableDictionary
-
getTotalOffHeapMemUsed
public long getTotalOffHeapMemUsed()
- Specified by:
getTotalOffHeapMemUsedin classBaseOffHeapMutableDictionary
-
doClose
public void doClose() throws IOException- Specified by:
doClosein classBaseOffHeapMutableDictionary- Throws:
IOException
-
-