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 boolean
computeOnHeapSize()
Whether on-heap size of this dictionary should be computed.long
estimateSizeOfValue(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:DimensionDictionary
Estimates 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:
estimateSizeOfValue
in classDimensionDictionary<String>
-
computeOnHeapSize
public boolean computeOnHeapSize()
Description copied from class:DimensionDictionary
Whether on-heap size of this dictionary should be computed.- Specified by:
computeOnHeapSize
in classDimensionDictionary<String>
-
-