This is an interesting approach, Nilesh!
Someone will correct me if I'm wrong, but I don't think this could go into
ClosureCleaner as a default behavior (since Kryo apparently breaks on some
classes that depend on custom Java serializers, as has come up on the list
recently). But it does seem
Thanks for sending this in.
The ASF list doesn't support html so the formatting of the code is a little
messed up. For those who want to see the code in clearly formatted text, go
to
http://apache-spark-developers-list.1001551.n3.nabble.com/Kryo-serialization-for-closures-a-workaround-tp6787.html