[SPARK-11016] Move RoaringBitmap to explicit Kryo serializer#9748
[SPARK-11016] Move RoaringBitmap to explicit Kryo serializer#9748davies wants to merge 5 commits into
Conversation
|
Test build #2067 has finished for PR 9748 at commit
|
|
Lacking background knowledge to sign off this one. Referenced discussions in #9243, metamx#1, SPARK-5949, and SPARK-11016. If understand it correctly, currently |
|
Oh I didn't notice that #9243 was reverted. So |
|
Yep, LGTM, thanks for going back and taking care of this loose end @davies |
|
Test build #46108 has finished for PR 9748 at commit
|
Fix the serialization of RoaringBitmap with Kyro serializer This PR came from metamx#1, thanks to drcrallen Author: Davies Liu <davies@databricks.com> Author: Charles Allen <charles@allen-net.com> Closes #9748 from davies/SPARK-11016. (cherry picked from commit bf25f9b) Signed-off-by: Davies Liu <davies.liu@gmail.com>
|
@davies here are some problems when deserialize RoaringBitmap. see the examples below: this will throw after same investigation, i found this is caused by a bug of kryo's So i think we can fix this issue in this two ways:
any advice? |
|
@scwf For 1.6 release, it's risky to upgrade Kryo, the second approach will be better, could you send out a PR for it? thanks! |
|
ok, should i send pr to master and branch-1.6 both? |
|
Sending to master should be enough, will be pickled into 1.6. |
…throw Buffer underflow exception Jira: https://issues.apache.org/jira/browse/SPARK-12222 Deserialize RoaringBitmap using Kryo serializer throw Buffer underflow exception: ``` com.esotericsoftware.kryo.KryoException: Buffer underflow. at com.esotericsoftware.kryo.io.Input.require(Input.java:156) at com.esotericsoftware.kryo.io.Input.skip(Input.java:131) at com.esotericsoftware.kryo.io.Input.skip(Input.java:264) ``` This is caused by a bug of kryo's `Input.skip(long count)`(EsotericSoftware/kryo#119) and we call this method in `KryoInputDataInputBridge`. Instead of upgrade kryo's version, this pr bypass the kryo's `Input.skip(long count)` by directly call another `skip` method in kryo's Input.java(https://github.com/EsotericSoftware/kryo/blob/kryo-2.21/src/com/esotericsoftware/kryo/io/Input.java#L124), i.e. write the bug-fixed version of `Input.skip(long count)` in KryoInputDataInputBridge's `skipBytes` method. more detail link to #9748 (comment) Author: Fei Wang <wangfei1@huawei.com> Closes #10213 from scwf/patch-1. (cherry picked from commit 3934562) Signed-off-by: Davies Liu <davies.liu@gmail.com>
…throw Buffer underflow exception Jira: https://issues.apache.org/jira/browse/SPARK-12222 Deserialize RoaringBitmap using Kryo serializer throw Buffer underflow exception: ``` com.esotericsoftware.kryo.KryoException: Buffer underflow. at com.esotericsoftware.kryo.io.Input.require(Input.java:156) at com.esotericsoftware.kryo.io.Input.skip(Input.java:131) at com.esotericsoftware.kryo.io.Input.skip(Input.java:264) ``` This is caused by a bug of kryo's `Input.skip(long count)`(EsotericSoftware/kryo#119) and we call this method in `KryoInputDataInputBridge`. Instead of upgrade kryo's version, this pr bypass the kryo's `Input.skip(long count)` by directly call another `skip` method in kryo's Input.java(https://github.com/EsotericSoftware/kryo/blob/kryo-2.21/src/com/esotericsoftware/kryo/io/Input.java#L124), i.e. write the bug-fixed version of `Input.skip(long count)` in KryoInputDataInputBridge's `skipBytes` method. more detail link to #9748 (comment) Author: Fei Wang <wangfei1@huawei.com> Closes #10213 from scwf/patch-1.
…throw Buffer underflow exception Jira: https://issues.apache.org/jira/browse/SPARK-12222 Deserialize RoaringBitmap using Kryo serializer throw Buffer underflow exception: ``` com.esotericsoftware.kryo.KryoException: Buffer underflow. at com.esotericsoftware.kryo.io.Input.require(Input.java:156) at com.esotericsoftware.kryo.io.Input.skip(Input.java:131) at com.esotericsoftware.kryo.io.Input.skip(Input.java:264) ``` This is caused by a bug of kryo's `Input.skip(long count)`(EsotericSoftware/kryo#119) and we call this method in `KryoInputDataInputBridge`. Instead of upgrade kryo's version, this pr bypass the kryo's `Input.skip(long count)` by directly call another `skip` method in kryo's Input.java(https://github.com/EsotericSoftware/kryo/blob/kryo-2.21/src/com/esotericsoftware/kryo/io/Input.java#L124), i.e. write the bug-fixed version of `Input.skip(long count)` in KryoInputDataInputBridge's `skipBytes` method. more detail link to apache#9748 (comment) Author: Fei Wang <wangfei1@huawei.com> Closes apache#10213 from scwf/patch-1.
Fix the serialization of RoaringBitmap with Kyro serializer
This PR came from metamx#1, thanks to @drcrallen