public RoaringBitmapIndexMergerV9Test( CompressionStrategy compressionStrategy, CompressionStrategy dimCompressionStrategy, LongEncodingStrategy longEncodingStrategy, SegmentWriteOutMediumFactory segmentWriteOutMediumFactory ) { super( new RoaringBitmapSerdeFactory(null), compressionStrategy, dimCompressionStrategy, longEncodingStrategy ); indexMerger = TestHelper.getTestIndexMergerV9(segmentWriteOutMediumFactory); } }
private static IndexTuningConfig createTuningConfig() { return new IndexTuningConfig( null, null, // null to compute maxRowsPerSegment automatically 500000, 1000000L, null, null, null, null, new IndexSpec( new RoaringBitmapSerdeFactory(true), CompressionStrategy.LZ4, CompressionStrategy.LZF, LongEncodingStrategy.LONGS ), 5000, true, false, true, false, null, 100L, null, null, null, null ); }
bitmapSerdeFactory = new ConciseBitmapSerdeFactory(); } else if (bitmapFactory instanceof RoaringBitmapFactory) { bitmapSerdeFactory = new RoaringBitmapSerdeFactory(null); } else { throw new ISE(
null, new IndexSpec( new RoaringBitmapSerdeFactory(true), CompressionStrategy.LZ4, CompressionStrategy.LZF,
@Test public void testSerialization() throws Exception { ObjectMapper mapper = new DefaultObjectMapper(); Assert.assertEquals("{\"type\":\"roaring\",\"compressRunOnSerialization\":true}", mapper.writeValueAsString(new RoaringBitmapSerdeFactory(null))); Assert.assertEquals("{\"type\":\"roaring\",\"compressRunOnSerialization\":false}", mapper.writeValueAsString(new RoaringBitmapSerdeFactory(false))); Assert.assertEquals("{\"type\":\"roaring\",\"compressRunOnSerialization\":true}", mapper.writeValueAsString(new RoaringBitmapSerdeFactory(true))); Assert.assertEquals("{\"type\":\"concise\"}", mapper.writeValueAsString(new ConciseBitmapSerdeFactory())); Assert.assertEquals("{\"type\":\"concise\"}", mapper.writeValueAsString(BitmapSerde.createLegacyFactory())); Assert.assertEquals("{\"type\":\"concise\"}", mapper.writeValueAsString(new BitmapSerde.DefaultBitmapSerdeFactory())); Assert.assertEquals("{\"type\":\"concise\"}", mapper.writeValueAsString(new BitmapSerde.LegacyBitmapSerdeFactory())); }
final BitmapSerdeFactory serdeFactory = new RoaringBitmapSerdeFactory(null); final List<Integer> ints = generateInts(); final GenericIndexed<String> dictionary = GenericIndexed.fromIterable(
final BitmapSerdeFactory serdeFactory = new RoaringBitmapSerdeFactory(null); final List<Integer> ints = generateInts(); final GenericIndexed<String> dictionary = GenericIndexed.fromIterable(
@Parameterized.Parameters public static Iterable<Object[]> constructorFeeder() { return ImmutableList.of( new Object[]{new ConciseBitmapFactory(), new ConciseBitmapSerdeFactory()}, new Object[]{new RoaringBitmapFactory(), new RoaringBitmapSerdeFactory(null)} ); }
final BitmapSerdeFactory serdeFactory = new RoaringBitmapSerdeFactory(null); final List<Integer> ints = generateInts(); final GenericIndexed<String> dictionary = GenericIndexed.fromIterable(
null, new IndexSpec( new RoaringBitmapSerdeFactory(true), CompressionStrategy.LZ4, CompressionStrategy.LZF,
@Test public void testSerde() throws Exception { final ObjectMapper objectMapper = new DefaultObjectMapper(); final String json = "{ \"bitmap\" : { \"type\" : \"roaring\" }, \"dimensionCompression\" : \"lz4\", \"metricCompression\" : \"lzf\"" + ", \"longEncoding\" : \"auto\" }"; final IndexSpec spec = objectMapper.readValue(json, IndexSpec.class); Assert.assertEquals(new RoaringBitmapSerdeFactory(null), spec.getBitmapSerdeFactory()); Assert.assertEquals(CompressionStrategy.LZ4, spec.getDimensionCompression()); Assert.assertEquals(CompressionStrategy.LZF, spec.getMetricCompression()); Assert.assertEquals(CompressionFactory.LongEncodingStrategy.AUTO, spec.getLongEncoding()); Assert.assertEquals(spec, objectMapper.readValue(objectMapper.writeValueAsBytes(spec), IndexSpec.class)); }
"roaring", new RoaringBitmapSerdeFactory(true) );
null, new IndexSpec( new RoaringBitmapSerdeFactory(true), CompressionStrategy.LZ4, CompressionStrategy.LZF,
null, new IndexSpec( new RoaringBitmapSerdeFactory(true), CompressionStrategy.LZ4, CompressionStrategy.LZF,
null, new IndexSpec( new RoaringBitmapSerdeFactory(true), CompressionStrategy.LZ4, CompressionStrategy.LZF,
bitmapSerdeFactory = new ConciseBitmapSerdeFactory(); } else if (bitmapFactory instanceof RoaringBitmapFactory) { bitmapSerdeFactory = new RoaringBitmapSerdeFactory(null); } else { throw new ISE(