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

[FLINK-6025] [core] Add Flink's own JavaSerializer for Kryo serialization #3517

Closed
wants to merge 1 commit into from

Conversation

tzulitai
Copy link
Contributor

@tzulitai tzulitai commented Mar 12, 2017

This PR adds a reimplemented JavaSerializer to be registered with
Kryo. This is due to a know issue with Kryo's JavaSerializer that may
use the wrong classloader for deserialzation (see EsotericSoftware/kryo#483).

Since we by default register Kryo's JavaSerializer for Throwables, users who need to serialize exception types as messages bump into ClassNotFoundExceptions.
Instead of registering Kryo's JavaSerializer for Throwables, it is now changed to register the reimplemented JavaSerializer.

Generally, users who bump into ClassNotFoundExceptions if they are using Kryo's JavaSerializer for
their own custom types are also recommended to change to Flink's JavaSerializer.

The change is tested using the minimal issue reproducing example provided by our users in http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/AWS-exception-serialization-problem-td12063.html.

…tion

This commit adds a reimplemented JavaSerializer to be registered with
Kryo. This is due to a know issue with Kryo's JavaSerializer that may
use the wrong classloader for deserialzation.

Instead of registering Kryo's JavaSerializer for Throwables, it is now
changed to register the reimplemented JavaSerializer. Users who bump
into ClassNotFoundExceptions if they are using Kryo's JavaSerializer for
their own types are also recommended to change to Flink's JavaSerializer.
@rmetzger
Copy link
Contributor

Good change, +1 to merge

@tzulitai
Copy link
Contributor Author

Thank you for the reviews @rmetzger! I'll proceed to merge this and the backport PRs.

@asfgit asfgit closed this in f214317 Mar 13, 2017
@tzulitai tzulitai deleted the FLINK-6025 branch March 13, 2017 15:54
p16i pushed a commit to p16i/flink that referenced this pull request Apr 16, 2017
…tion

This commit adds a reimplemented JavaSerializer to be registered with
Kryo. This is due to a know issue with Kryo's JavaSerializer that may
use the wrong classloader for deserialzation.

Instead of registering Kryo's JavaSerializer for Throwables, it is now
changed to register the reimplemented JavaSerializer. Users who bump
into ClassNotFoundExceptions if they are using Kryo's JavaSerializer for
their own types are also recommended to change to Flink's JavaSerializer.

This closes apache#3517.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants