Skip to content

Commit

Permalink
Removed custom Flink version of Kryo's JavaSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurt Ostfeld committed May 28, 2023
1 parent de7dffe commit 64606e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 91 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,10 @@ private void checkKryoInitialized() {
// Note: the registered JavaSerializer is Flink's own implementation, and not Kryo's.
// This is due to a know issue with Kryo's JavaSerializer. See FLINK-6025 for
// details.
kryo.addDefaultSerializer(Throwable.class, new JavaSerializer());
// There was a problem with Kryo 2.x JavaSerializer that is fixed in Kryo 5.x
kryo.addDefaultSerializer(
Throwable.class,
new com.esotericsoftware.kryo.kryo5.serializers.JavaSerializer());

// Add default serializers first, so that the type registrations without a serializer
// are registered with a default serializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import org.apache.flink.api.java.typeutils.GenericTypeInfo;
import org.apache.flink.api.java.typeutils.TypeExtractor;
import org.apache.flink.api.java.typeutils.runtime.PojoSerializer;
import org.apache.flink.api.java.typeutils.runtime.kryo5.JavaSerializer;
import org.apache.flink.api.java.typeutils.runtime.kryo5.KryoSerializer;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.StateBackendOptions;
Expand Down Expand Up @@ -5535,7 +5534,7 @@ public Object read(
* state backend correctly uses a specified Kryo serializer.
*/
public static class ExceptionThrowingTestKryo5Serializer
extends org.apache.flink.api.java.typeutils.runtime.kryo5.JavaSerializer {
extends com.esotericsoftware.kryo.kryo5.serializers.JavaSerializer {
@Override
public void write(
com.esotericsoftware.kryo.kryo5.Kryo kryo,
Expand Down Expand Up @@ -5589,7 +5588,7 @@ public Object read(
* restored with a {@code Serializer} that was later registered.
*/
public static class CustomKryo5TestSerializer
extends org.apache.flink.api.java.typeutils.runtime.kryo5.JavaSerializer {
extends com.esotericsoftware.kryo.kryo5.serializers.JavaSerializer {
@Override
public void write(
com.esotericsoftware.kryo.kryo5.Kryo kryo,
Expand Down

0 comments on commit 64606e6

Please sign in to comment.