Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
https://github.com/nathanmarz/storm/issues/199
Just need to make a ByteBuffer serializer and register it with Kryo as default.
-------------------------
brianmartin: I've written most of this but have run into a problem.
ByteBuffer's are often HeapByteBuffer's, which is a private to java.nio. Therefore, it seems like even though ByteBuffer is registered, Kryo goes to the default serializer anyway because HeapByteBuffer is not registered.
I'm not sure what a reasonable workaround for this would be.
patch draft w/ test: https://gist.github.com/3094071
--------------------------
nathanmarz: Is there any sort of reflection trick you could use to get ahold of the HeapByteBuffer class and register it?
--------------------------
brianmartin: Ah, thanks for the tip.
I've submitted a pull request for this. Apologies for not being able to attach the request to this issue (if that's possible).
Let me know if any changes or contributor agreement are needed.