Uh oh!
There was an error while loading. Please reload this page.
[SPARK-27216][CORE] Upgrade RoaringBitmap to 0.7.45 to fix Kryo unsafe ser/dser issue - #24264
[SPARK-27216][CORE] Upgrade RoaringBitmap to 0.7.45 to fix Kryo unsafe ser/dser issue#24264LantaoJin wants to merge 11 commits into
Conversation
LantaoJin
commented
Apr 1, 2019
| conf.set(KRYO_USE_UNSAFE, false) | ||
| val safeSer = new KryoSerializer(conf).newInstance() | ||
| var actual : RoaringBitmap = safeSer.deserialize(safeSer.serialize(expected)) |
There was a problem hiding this comment.
Nit: I think the style checker will flag the space before the colon.
| } | ||
| test("SPARK-27216: Upgrade RoaringBitmap to 0.7.45 to fix Kryo unsafe ser/dser issue") { | ||
| val expected = new RoaringBitmap |
SparkQA
commented
Apr 1, 2019
Test build #4675 has finished for PR 24264 at commit
|
LantaoJin
commented
Apr 1, 2019
Rename for a better searching or tracing. |
| super.afterAll() | ||
| } | ||
| test("SPARK-27216: Upgrade RoaringBitmap to 0.7.45 to fix Kryo unsafe ser/dser issue") { |
There was a problem hiding this comment.
Please move your test into KryoSerializerSuite where conf.set(KRYO_USE_UNSAFE, false) is given.
And as UnsafeKryoSerializerSuite is inherited from KryoSerializerSuite beside using conf.set(KRYO_USE_UNSAFE, true) in beforeAll() it will inherit your test method so both the safe/unsafe case will be tested this way: once executing KryoSerializerSuite and once UnsafeKryoSerializerSuite.
Summary: you do not need to test both cases in one test method.
There was a problem hiding this comment.
Oh, thanks for this reminding.
srowen
commented
Apr 1, 2019
Run |
| val expected = new RoaringBitmap() | ||
| expected.add(1787) | ||
| conf.set(KRYO_USE_UNSAFE, true) |
There was a problem hiding this comment.
I dont' think this is what @attilapiros meant. I think he meant to (a) leave UnsafeKryoSerializerSuite as it was before and (b) add a new test which just tested serialization of RoaringBitmap with kryo in this class, but didn't tweak confs at all. That way you'd get a test for serializing with kryo.unsafe=false (here in KryoSerializerSuite) and you'd also automatically get a test with kryo.unsafe=true (inherited in UnsafeKryoSerializerSuite).
There was a problem hiding this comment.
Exactly. I was about to write a similar comment.
Uh... @attilapiros Is it proper now? |
attilapiros
commented
Apr 2, 2019
@LantaoJin No.
|
attilapiros
commented
Apr 2, 2019
Finally via |
attilapiros
commented
Apr 2, 2019
You can revert the deletion by: But please double check the commit ID (my laptop used for developing Spark runs an OS update and this is my other machine...). |
LantaoJin
commented
Apr 2, 2019
Everything looks fine from my side. |
LantaoJin
commented
Apr 2, 2019
@attilapiros Oh, I read your comment again. I guess I have understood it. I will refactor it. |
LantaoJin
commented
Apr 2, 2019
@attilapiros What about it now? |
attilapiros
commented
Apr 2, 2019
@LantaoJinNow your change is almost perfect. But as there was no need to import I have found this: I think it is out-dated and this test can be removed as the statement |
LantaoJin
commented
Apr 2, 2019
I think it's out-dated. But it needs double check if we plan to merge this PR to multiple branches. |
attilapiros
commented
Apr 2, 2019
As this change contradicts with that statement it is safe to remove that test. |
LantaoJin
commented
Apr 2, 2019
I've checked branch 2.1 and above. The kryo versions in them are all 3.0 or above. According to the description in SPARK-12222, it should be safe. I will remove it. |
attilapiros
commented
Apr 2, 2019
Jenkins retest this please. |
squito
commented
Apr 2, 2019
lgtm assuming tests pass. Thanks for the work on this @LantaoJin & @attilapiros |
SparkQA
commented
Apr 2, 2019
Test build #4679 has finished for PR 24264 at commit
|
lemire
commented
Apr 3, 2019
You might want to consider upgrading directly to RoaringBitmap 0.8.0. We added |
squito
commented
Apr 4, 2019
@lemire I think that's a good idea for something to do eventually, but I think that can be handled separately. IIUC, to take advantage of those performance improvements, we need to change how we're serializing the RoaringBitmaps inside spark. This is a bug fix we can get in now. I filed https://issues.apache.org/jira/browse/SPARK-27367 for this if anybody wants to follow up with that |
squito
commented
Apr 4, 2019
I merged this to master, but there were merge conflicts going back farther. @LantaoJin would you like to open another pr, against branch 2.4 at least? |
…fix Kryo unsafe ser/dser issue ## What changes were proposed in this pull request? Back-port of #24264 to branch-2.4. HighlyCompressedMapStatus uses RoaringBitmap to record the empty blocks. But RoaringBitmap couldn't be ser/deser with unsafe KryoSerializer. It's a bug of RoaringBitmap-0.5.11 and fixed in latest version. ## How was this patch tested? Add a UT Closes#24290 from LantaoJin/SPARK-27216_BACKPORT-2.4. Authored-by: LantaoJin <jinlantao@gmail.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
…fix Kryo unsafe ser/dser issue ## What changes were proposed in this pull request? Back-port of #24264 to branch-2.3. HighlyCompressedMapStatus uses RoaringBitmap to record the empty blocks. But RoaringBitmap couldn't be ser/deser with unsafe KryoSerializer. It's a bug of RoaringBitmap-0.5.11 and fixed in latest version. ## How was this patch tested? Add a UT Closes#24291 from LantaoJin/SPARK-27216_BACKPORT-2.3. Authored-by: LantaoJin <jinlantao@gmail.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
…fix Kryo unsafe ser/dser issue ## What changes were proposed in this pull request? Back-port of apache#24264 to branch-2.4. HighlyCompressedMapStatus uses RoaringBitmap to record the empty blocks. But RoaringBitmap couldn't be ser/deser with unsafe KryoSerializer. It's a bug of RoaringBitmap-0.5.11 and fixed in latest version. ## How was this patch tested? Add a UT Closesapache#24290 from LantaoJin/SPARK-27216_BACKPORT-2.4. Authored-by: LantaoJin <jinlantao@gmail.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
…fix Kryo unsafe ser/dser issue ## What changes were proposed in this pull request? Back-port of apache#24264 to branch-2.4. HighlyCompressedMapStatus uses RoaringBitmap to record the empty blocks. But RoaringBitmap couldn't be ser/deser with unsafe KryoSerializer. It's a bug of RoaringBitmap-0.5.11 and fixed in latest version. ## How was this patch tested? Add a UT Closesapache#24290 from LantaoJin/SPARK-27216_BACKPORT-2.4. Authored-by: LantaoJin <jinlantao@gmail.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
…fix Kryo unsafe ser/dser issue ## What changes were proposed in this pull request? Back-port of apache#24264 to branch-2.4. HighlyCompressedMapStatus uses RoaringBitmap to record the empty blocks. But RoaringBitmap couldn't be ser/deser with unsafe KryoSerializer. It's a bug of RoaringBitmap-0.5.11 and fixed in latest version. ## How was this patch tested? Add a UT Closesapache#24290 from LantaoJin/SPARK-27216_BACKPORT-2.4. Authored-by: LantaoJin <jinlantao@gmail.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
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.
It's a bug of RoaringBitmap-0.5.11 and fixed in latest version.
This is an update of #24157
How was this patch tested?
Add a UT