Tabnine Logo
RoaringBitmapSerdeFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
RoaringBitmapSerdeFactory
in
org.apache.druid.segment.data

Best Java code snippets using org.apache.druid.segment.data.RoaringBitmapSerdeFactory (Showing top 17 results out of 315)

origin: apache/incubator-druid

 public RoaringBitmapIndexMergerV9Test(
   CompressionStrategy compressionStrategy,
   CompressionStrategy dimCompressionStrategy,
   LongEncodingStrategy longEncodingStrategy,
   SegmentWriteOutMediumFactory segmentWriteOutMediumFactory
 )
 {
  super(
    new RoaringBitmapSerdeFactory(null),
    compressionStrategy,
    dimCompressionStrategy,
    longEncodingStrategy
  );
  indexMerger = TestHelper.getTestIndexMergerV9(segmentWriteOutMediumFactory);
 }
}
origin: apache/incubator-druid

 @Test
 public void testDeserialization() throws Exception
 {
  ObjectMapper mapper = new DefaultObjectMapper();
  final BitmapSerdeFactory roaringFactory = mapper.readValue("{\"type\":\"roaring\"}", BitmapSerdeFactory.class);
  Assert.assertTrue(roaringFactory instanceof RoaringBitmapSerdeFactory);
  Assert.assertTrue(((RoaringBitmapSerdeFactory) roaringFactory).getCompressRunOnSerialization());

  final BitmapSerdeFactory compressingRoaringFactory = mapper.readValue(
    "{\"type\":\"roaring\", \"compressRunOnSerialization\":false}",
    BitmapSerdeFactory.class
  );
  Assert.assertTrue(compressingRoaringFactory instanceof RoaringBitmapSerdeFactory);
  Assert.assertFalse(((RoaringBitmapSerdeFactory) compressingRoaringFactory).getCompressRunOnSerialization());

  Assert.assertTrue(mapper.readValue("{\"type\":\"concise\"}", BitmapSerdeFactory.class) instanceof ConciseBitmapSerdeFactory);
  Assert.assertTrue(mapper.readValue("{\"type\":\"BitmapSerde$SomeRandomClass\"}", BitmapSerdeFactory.class) instanceof ConciseBitmapSerdeFactory);
 }
}
origin: apache/incubator-druid

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
 );
}
origin: apache/incubator-druid

 bitmapSerdeFactory = new ConciseBitmapSerdeFactory();
} else if (bitmapFactory instanceof RoaringBitmapFactory) {
 bitmapSerdeFactory = new RoaringBitmapSerdeFactory(null);
} else {
 throw new ISE(
origin: apache/incubator-druid

null,
new IndexSpec(
  new RoaringBitmapSerdeFactory(true),
  CompressionStrategy.LZ4,
  CompressionStrategy.LZF,
origin: apache/incubator-druid

@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()));
}
origin: apache/incubator-druid

final BitmapSerdeFactory serdeFactory = new RoaringBitmapSerdeFactory(null);
final List<Integer> ints = generateInts();
final GenericIndexed<String> dictionary = GenericIndexed.fromIterable(
origin: apache/incubator-druid

final BitmapSerdeFactory serdeFactory = new RoaringBitmapSerdeFactory(null);
final List<Integer> ints = generateInts();
final GenericIndexed<String> dictionary = GenericIndexed.fromIterable(
origin: apache/incubator-druid

@Parameterized.Parameters
public static Iterable<Object[]> constructorFeeder()
{
 return ImmutableList.of(
   new Object[]{new ConciseBitmapFactory(), new ConciseBitmapSerdeFactory()},
   new Object[]{new RoaringBitmapFactory(), new RoaringBitmapSerdeFactory(null)}
 );
}
origin: apache/incubator-druid

final BitmapSerdeFactory serdeFactory = new RoaringBitmapSerdeFactory(null);
final List<Integer> ints = generateInts();
final GenericIndexed<String> dictionary = GenericIndexed.fromIterable(
origin: apache/incubator-druid

null,
new IndexSpec(
  new RoaringBitmapSerdeFactory(true),
  CompressionStrategy.LZ4,
  CompressionStrategy.LZF,
origin: apache/incubator-druid

@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));
}
origin: apache/incubator-druid

  "roaring", new RoaringBitmapSerdeFactory(true)
);
origin: apache/incubator-druid

null,
new IndexSpec(
  new RoaringBitmapSerdeFactory(true),
  CompressionStrategy.LZ4,
  CompressionStrategy.LZF,
origin: apache/incubator-druid

null,
new IndexSpec(
  new RoaringBitmapSerdeFactory(true),
  CompressionStrategy.LZ4,
  CompressionStrategy.LZF,
origin: apache/incubator-druid

null,
new IndexSpec(
  new RoaringBitmapSerdeFactory(true),
  CompressionStrategy.LZ4,
  CompressionStrategy.LZF,
origin: org.apache.druid/druid-services

 bitmapSerdeFactory = new ConciseBitmapSerdeFactory();
} else if (bitmapFactory instanceof RoaringBitmapFactory) {
 bitmapSerdeFactory = new RoaringBitmapSerdeFactory(null);
} else {
 throw new ISE(
org.apache.druid.segment.dataRoaringBitmapSerdeFactory

Most used methods

  • <init>
  • getCompressRunOnSerialization

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now