Package org.apache.druid.segment.data
Class V3CompressedVSizeColumnarMultiIntsSerializer
java.lang.Object
org.apache.druid.segment.data.ColumnarMultiIntsSerializer
org.apache.druid.segment.data.V3CompressedVSizeColumnarMultiIntsSerializer
- All Implemented Interfaces:
ColumnarIntsSerializer,Serializer
Streams array of integers out in the binary format described by
V3CompressedVSizeColumnarMultiIntsSupplier-
Method Summary
Modifier and TypeMethodDescriptionvoidaddValues(IndexedInts ints) create(String columnName, SegmentWriteOutMedium segmentWriteOutMedium, String filenameBase, int maxValue, CompressionStrategy compression, int fileSizeLimit) Creates a new serializer.longReturns the number of bytes, that this Serializer will write to the output _channel_ (not smoosher) on aSerializer.writeTo(java.nio.channels.WritableByteChannel, org.apache.druid.java.util.common.io.smoosh.FileSmoosher)call.voidopen()voidwriteTo(WritableByteChannel channel, FileSmoosher smoosher) Writes the serialized form of this object.
-
Method Details
-
create
public static V3CompressedVSizeColumnarMultiIntsSerializer create(String columnName, SegmentWriteOutMedium segmentWriteOutMedium, String filenameBase, int maxValue, CompressionStrategy compression, int fileSizeLimit) Creates a new serializer.- Parameters:
columnName- name of the column to writesegmentWriteOutMedium- supplier of temporary filesfilenameBase- base filename to be used for secondary files, if multiple files are neededmaxValue- maximum integer value that will be written to the columncompression- compression strategy to applyfileSizeLimit- limit for files created by the writer. In production code, this should always beGenericIndexedWriter.MAX_FILE_SIZE. The parameter is exposed only for testing.
-
open
- Throws:
IOException
-
addValues
- Specified by:
addValuesin classColumnarMultiIntsSerializer- Throws:
IOException
-
getSerializedSize
Description copied from interface:SerializerReturns the number of bytes, that this Serializer will write to the output _channel_ (not smoosher) on aSerializer.writeTo(java.nio.channels.WritableByteChannel, org.apache.druid.java.util.common.io.smoosh.FileSmoosher)call.- Throws:
IOException
-
writeTo
Description copied from interface:SerializerWrites the serialized form of this object. The entire object may be written to the provided channel, or the object may be split over the provided channel and files added to thewhere additional channels can be created viainvalid @link
{@link FileSmoosher],FileSmoosher.addWithSmooshedWriter(String, long). The latter approach is useful when the serialized form of the object is too large for a single smoosh container. At the time this javadoc was written, the max smoosh container size is limit to the maxByteBuffersize.- Throws:
IOException
-