-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix serialization of KryoHadoop
#1685
Fix serialization of KryoHadoop
#1685
Conversation
Lgtm. We can also add a serializer for Config by just converting to and from a Map[String, String] I think. |
I think we should make your change AND make Config Kryo serializable. Belt and suspenders. |
Now I see. It's not simple (at least in this PR) for now because |
@ttim look on trait |
@dieu small clarification - what we pass there isn't scalding config but chill's one, which doesn't contain this method. |
ahh yes. We should open an issue on Chill to make all of the Config Serializable and Kryo serializable. |
@ttim everything is serializable in |
@johnynek So I guess we don't need to create an issue in chill because Also I did a small refactoring to make logic clearer (and avoid transient fields), what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not crazy about this at all. Multiple constructors is non-idiomatic in scala and many folks subclass this as it is. I'd rather do the first fix personally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To put it another way: this type, and hose like them, are created with reflection and expected to have a constructor that accepts a Config. This is part of chill-hadoop.
Also, if we add another option we would be adding another parameter to the constructor vs just reading more from the Config.
@johnynek my main motivation was to make object's state more clear (and I guess |
@johnynek Do you think this PR is ready to go? We need this fix for upgrading summingbird to 2.12 twitter/summingbird#721. Thanks |
👍 |
* Fix serialization of KryoHadoop * Increase buffer size for serialization test * Small refactoring to make serialization logic more direct * Revert: Small refactoring to make serialization logic more direct
* Fix serialization of KryoHadoop * Increase buffer size for serialization test * Small refactoring to make serialization logic more direct * Revert: Small refactoring to make serialization logic more direct
In process of Summingbird migration I found that serialization of
KryoHadoop
class was broken recently, this PR adds test for that and fixes it.