Package org.apache.druid.segment.data
Class VSizeLongSerde
java.lang.Object
org.apache.druid.segment.data.VSizeLongSerde
Currently only support big endian
An empty 4 bytes is written upon closing to avoid index out of bound exception for deserializers that shift bytes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceUnpack bitpacked long values from an underlying contiguous memory blockstatic interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetBitsForMax(long value) getDeserializer(int longSize, ByteBuffer fromBuffer, int bufferOffset) static intgetNumValuesPerBlock(int bitsPerValue, int blockSize) Block size should be power of 2, soColumnarLongs.get(int)can be optimized using bit operators.static intgetSerializedSize(int bitsPerValue, int numValues) getSerializer(int longSize, OutputStream output) getSerializer(int longSize, ByteBuffer buffer, int bufferOffset)
-
Field Details
-
SUPPORTED_SIZES
public static final int[] SUPPORTED_SIZES -
EMPTY
public static final byte[] EMPTY
-
-
Constructor Details
-
VSizeLongSerde
public VSizeLongSerde()
-
-
Method Details
-
getBitsForMax
public static int getBitsForMax(long value) -
getSerializedSize
public static int getSerializedSize(int bitsPerValue, int numValues) -
getNumValuesPerBlock
public static int getNumValuesPerBlock(int bitsPerValue, int blockSize) Block size should be power of 2, soColumnarLongs.get(int)can be optimized using bit operators. -
getSerializer
-
getSerializer
public static VSizeLongSerde.LongSerializer getSerializer(int longSize, ByteBuffer buffer, int bufferOffset) -
getDeserializer
public static VSizeLongSerde.LongDeserializer getDeserializer(int longSize, ByteBuffer fromBuffer, int bufferOffset)
-