LantaoJin opened a new pull request #24157: [WIP][SPARK-27216][CORE] Kryo 
serialization with RoaringBitmap
URL: https://github.com/apache/spark/pull/24157
 
 
   ## What changes were proposed in this pull request?
   
   HighlyCompressedMapStatus uses RoaringBitmap to record the empty blocks. But 
RoaringBitmap couldn't be ser/deser with unsafe KryoSerializer.
   
   ## How was this patch tested?
   
   Adding UT
   ```scala
     test("kryo serialization with RoaringBitmap") {
       val bitmap = new RoaringBitmap
       bitmap.add(1787)
   
       val safeSer = new KryoSerializer(conf).newInstance()
       val bitmap2 : RoaringBitmap = 
safeSer.deserialize(safeSer.serialize(bitmap))
       assert(bitmap2.equals(bitmap))
   
       conf.set("spark.kryo.unsafe", "true")
       val unsafeSer = new KryoSerializer(conf).newInstance()
       val bitmap3 : RoaringBitmap = 
unsafeSer.deserialize(unsafeSer.serialize(bitmap))
       assert(bitmap3.equals(bitmap)) // this will fail
     }
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to