Skip to content
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

BUGFIX - Use Guava Optional (which is Serializable) in CompactionOperation to avoid NoSerializableException #435

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

bvaradar
Copy link
Contributor

@bvaradar bvaradar commented Aug 8, 2018

CompactionOperation uses java.util.Optional which is not serializable.

Making kryo serializer work with java.util.Optional involves implementing a custom serializer (https://stackoverflow.com/questions/36144618/spark-kryo-register-a-custom-serializer). With Hoodie being a library, this option may not be a generic one.

Instead of java.util.Optional , we can use Guava's version of Optional which is serializable. This PR makes changes only to CompactionOperation class. If everybody is ok with this, we can make one pass in separate PR to replace java.util.Optional with Guava's Optional.

@vinothchandar @n3nash : Please review this

…ation wcached to avoid NoSerializableException
@n3nash
Copy link
Contributor

n3nash commented Aug 8, 2018

I am of similar opinion that we should move java.util.Optional to Guava Optional. As long as no client facing API's / payloads required java optional, this change should not affect anyone.

This diff LGTM

@vinothchandar vinothchandar merged commit 989afdd into apache:master Aug 8, 2018
vinishjail97 pushed a commit to vinishjail97/hudi that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants