Package org.apache.druid.segment
Class StringDimensionDictionary
- java.lang.Object
-
- org.apache.druid.segment.DimensionDictionary<String>
-
- org.apache.druid.segment.StringDimensionDictionary
-
public class StringDimensionDictionary extends DimensionDictionary<String>
DimensionDictionary for String dimension values.
-
-
Field Summary
-
Fields inherited from class org.apache.druid.segment.DimensionDictionary
ABSENT_VALUE_ID
-
-
Constructor Summary
Constructors Constructor Description StringDimensionDictionary(boolean computeOnHeapSize)Creates a StringDimensionDictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancomputeOnHeapSize()Whether on-heap size of this dictionary should be computed.longestimateSizeOfValue(String value)Estimates the size of the dimension value in bytes.-
Methods inherited from class org.apache.druid.segment.DimensionDictionary
add, getId, getIdForNull, getMaxValue, getMinValue, getValue, getValues, size, sizeInBytes, sort
-
-
-
-
Method Detail
-
estimateSizeOfValue
public long estimateSizeOfValue(String value)
Description copied from class:DimensionDictionaryEstimates the size of the dimension value in bytes.This method is called when adding a new dimension value to the lookup only if
DimensionDictionary.computeOnHeapSize()returns true.- Specified by:
estimateSizeOfValuein classDimensionDictionary<String>
-
computeOnHeapSize
public boolean computeOnHeapSize()
Description copied from class:DimensionDictionaryWhether on-heap size of this dictionary should be computed.- Specified by:
computeOnHeapSizein classDimensionDictionary<String>
-
-