Repository navigation
Conversation
Issue apache#3586 shows situation where Kyro is unable to serialize the SparkPartition object (@rdblue points it out from the stack trace). This commit replaces the ImmutableMap with HashMap
|
|
||
| public SparkPartition(Map<String, String> values, String uri, String format) { | ||
| this.values = ImmutableMap.copyOf(values); | ||
| this.values = new HashMap<>(values); |
There was a problem hiding this comment.
Can you use Maps.newHashMap? We prefer the Guava factory methods to individual implementations.
Also, can you add a test for this that does a round-trip serialization using Kryo?
|
Thanks for working on this, @dubeme! |
There was a problem hiding this comment.
Thanks for the contribution @dubeme!
For the serialization test, it would probably be sufficient to simply instantiate a SparkPartition and then ensure it can be round tripped (same object before and after) via Kryo serde.
There's a helper function for this, org.apache.iceberg.KryoHelpers.roundTripSerialize, which you can see in this similar test that can be used for checking the before and after:
|
Hi @dubeme, we are approaching the release of 0.13, and this is a critical bug that needs to be merged before the branch cut. Would you have time to update this PR? If not I can put up the same fix and mark you as coauthor. |
Agreed. I’d say we give them a few more days and then we mark them as co-author. I’d be happy to do it as well if you’re busy. Let me know! |
Issue #3586 shows situation where Kyro is unable to serialize the SparkPartition object (@rdblue points it out from the stack trace). This commit replaces the ImmutableMap with HashMap
I tested this manually, by creating a .jar, then running a local spark application. I unfortunately don't have the deep understanding to add the Unit tests for the
add_filesaction.