Return of filterKeys is not serializable. I'm not sure this is intended behaviour or a bug, but it's possible to confuse users. Attached file throws following exception:
The text was updated successfully, but these errors were encountered:
filterKeys and mapValues basically return views that reference the original collection and a filter predicate instead of creating an entirely new collection. So it is no wonder they are not serializable.
Fix #4776 by either returning a MapView or returning an entirely new Map, and the issue will solve itself.
Eran Medan (eranation) said (edited on Mar 7, 2015 10:11:07 AM UTC):
This causes interesting bugs when using with Spark...
Used -Dsun.io.serialization.extendedDebugInfo=true and the way to here was short
Anything I can do to help? isn't this a simple fix? (I saw some pull requests... anything wrong with them?)