Package org.apache.druid.segment
Class EncodedKeyComponent<K>
- java.lang.Object
-
- org.apache.druid.segment.EncodedKeyComponent<K>
-
- Type Parameters:
K
- Encoded key component type
public class EncodedKeyComponent<K> extends Object
Represents the encoded component of a row key corresponding to a single dimension. The row key contains a component for each dimension.
-
-
Constructor Summary
Constructors Constructor Description EncodedKeyComponent(K component, long effectiveSizeBytes)
Creates an EncodedKeyComponent corresponding to a single dimension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description K
getComponent()
Encoded dimension value(s) to be used as a component for a row key.long
getEffectiveSizeBytes()
Effective size of the key component in bytes.
-
-
-
Constructor Detail
-
EncodedKeyComponent
public EncodedKeyComponent(@Nullable K component, long effectiveSizeBytes)
Creates an EncodedKeyComponent corresponding to a single dimension.- Parameters:
component
- The encoded dimension value(s)effectiveSizeBytes
- Effective size of the key component in bytes. This value is used to estimate on-heap memory usage and must account for the footprint of both the original and encoded dimension values, as applicable.
-
-
Method Detail
-
getComponent
@Nullable public K getComponent()
Encoded dimension value(s) to be used as a component for a row key.
-
getEffectiveSizeBytes
public long getEffectiveSizeBytes()
Effective size of the key component in bytes. This value is used to estimate on-heap memory usage and accounts for the memory footprint of both the original and encoded dimension values, as applicable.
-
-