Open marctinkler opened 6 years ago
We make extensive use of RoaringBitmaps (https://github.com/RoaringBitmap/RoaringBitmap) in our code, and we notice that they get corrupted when serialized via FST. They implement both Serializable and Externalizable.
Here's a simple example:
RoaringBitmap map = new RoaringBitmap(); map.add(1,2,3); FSTConfiguration config = FSTConfiguration.createDefaultConfiguration(); RoaringBitmap read = (RoaringBitmap) config.getObjectInput(config.asByteArray(map)).readObject(); System.out.println("map1:"+ map); System.out.println("map2:"+ read);
This will output: map1:{1,2,3} map2:{4096,1,2}
huh, for a workaround register a serializer. Its probably the edge case being serializable and externalizable ..
We make extensive use of RoaringBitmaps (https://github.com/RoaringBitmap/RoaringBitmap) in our code, and we notice that they get corrupted when serialized via FST. They implement both Serializable and Externalizable.
Here's a simple example:
This will output: map1:{1,2,3} map2:{4096,1,2}