Search in sources :

Example 1 with VSizeColumnarIntsSerializer

use of org.apache.druid.segment.data.VSizeColumnarIntsSerializer in project druid by druid-io.

the class DictionaryEncodedColumnMerger method setupEncodedValueWriter.

protected void setupEncodedValueWriter() throws IOException {
    final CompressionStrategy compressionStrategy = indexSpec.getDimensionCompression();
    String filenameBase = StringUtils.format("%s.forward_dim", dimensionName);
    if (capabilities.hasMultipleValues().isTrue()) {
        if (compressionStrategy != CompressionStrategy.UNCOMPRESSED) {
            encodedValueSerializer = V3CompressedVSizeColumnarMultiIntsSerializer.create(dimensionName, segmentWriteOutMedium, filenameBase, cardinality, compressionStrategy);
        } else {
            encodedValueSerializer = new VSizeColumnarMultiIntsSerializer(dimensionName, segmentWriteOutMedium, cardinality);
        }
    } else {
        if (compressionStrategy != CompressionStrategy.UNCOMPRESSED) {
            encodedValueSerializer = CompressedVSizeColumnarIntsSerializer.create(dimensionName, segmentWriteOutMedium, filenameBase, cardinality, compressionStrategy);
        } else {
            encodedValueSerializer = new VSizeColumnarIntsSerializer(segmentWriteOutMedium, cardinality);
        }
    }
    encodedValueSerializer.open();
}
Also used : VSizeColumnarMultiIntsSerializer(org.apache.druid.segment.data.VSizeColumnarMultiIntsSerializer) V3CompressedVSizeColumnarMultiIntsSerializer(org.apache.druid.segment.data.V3CompressedVSizeColumnarMultiIntsSerializer) CompressedVSizeColumnarIntsSerializer(org.apache.druid.segment.data.CompressedVSizeColumnarIntsSerializer) VSizeColumnarIntsSerializer(org.apache.druid.segment.data.VSizeColumnarIntsSerializer) CompressionStrategy(org.apache.druid.segment.data.CompressionStrategy)

Aggregations

CompressedVSizeColumnarIntsSerializer (org.apache.druid.segment.data.CompressedVSizeColumnarIntsSerializer)1 CompressionStrategy (org.apache.druid.segment.data.CompressionStrategy)1 V3CompressedVSizeColumnarMultiIntsSerializer (org.apache.druid.segment.data.V3CompressedVSizeColumnarMultiIntsSerializer)1 VSizeColumnarIntsSerializer (org.apache.druid.segment.data.VSizeColumnarIntsSerializer)1 VSizeColumnarMultiIntsSerializer (org.apache.druid.segment.data.VSizeColumnarMultiIntsSerializer)1