Staff Software Practice Lead
Serialization is a critical topic when working with Flink because it often serializes things you might not expect. Flink has two different types of serialization: Internal and External. And within each type, there are multiple formats that might be used. Depending on your choices it can have an impact on message size, flexibility, schema evolution, and more. This video will outline the different ways that Flink uses serializers and show you how to implement a few of the basics.
Topics:
public class Person {
public String name;
private String email;
public Person() {}
public String getEmail() {return email;}
public void setEmail(String email) {this.email = email;}
}
env.getConfig().registerKryoType(MyCustomType.class);
env.getConfig().disableGenericTypes();
JsonSerializationSchema<MyClass> serializer =
new JsonSerializationSchema<>();
JsonDeserializationSchema<MyClass> deserializer =
new JsonDeserializationSchema<>(MyClass.class);
JsonSerializationSchema<MyClass> serializer =
new JsonSerializationSchema<>(() ->
new ObjectMapper()
.registerModule(new JavaTimeModule())
);
We will only share developer content and updates, including notifications when new content is added. We will never send you sales emails. 🙂 By subscribing, you understand we will process your personal information in accordance with our Privacy Statement.