@NotThreadSafe @ParametersAreNonnullByDefault public class EventRowSerializer extends org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>
Serializable because they are constructed when the stream graph is built and
thus must be transferred over the wire to the taskmanager nodes. This serialization form is not stored durably
and so we do not have to bother about reading another version of this same class.serialize(Row, DataOutputView) and deserialized using deserialize(DataInputView)snapshotConfiguration() of this serializer and then
storing it using EventRowSerializer.EventRowSerializerSnapshot.writeSnapshot(DataOutputView).EventRowSerializer.EventRowSerializerSnapshot that was previously stored and determine the level
of compatibility of the previous version with the runtime version of the serializer using
TypeSerializerSnapshot.resolveSchemaCompatibility(TypeSerializer).EventRowTypeInfo.createEmptyRow(). This is the main difference with the upstream RowSerializer that
supports either position based or named based row, position based rows cannot support migration with in
compatibleAfterMigration mode and named based rows are not usable everywhere (the JSON serializer expects positions).
The nature of aliased partition keys carried by EventRowTypeInfo.keyTypeInfo() does not affect how events
are serialized. Keys do not have to be taken into consideration when evaluating if stored events
are compatible with a newer version of this class or its underlying schema. They will be omitted
from EventRowSerializer.EventRowSerializerSnapshot configurations.
serialize(Row, DataOutputView).
In other words this means that the (@link #serialize} function must accept Rows created from a different serializer
(with possibly missing fields and/or fields at different position) but the serialization format must be the same as
if a properly constructed Row was passed.| Modifier and Type | Class and Description |
|---|---|
static class |
EventRowSerializer.EventRowSerializerSnapshot
The serialiazer snapshot, this object is meant to represent the state of a particular
EventRowSerializer. |
| Constructor and Description |
|---|
EventRowSerializer(org.apache.flink.api.common.typeutils.TypeSerializer<?>[] fieldSerializers,
LinkedHashMap<String,Integer> positionByName) |
| Modifier and Type | Method and Description |
|---|---|
void |
copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target) |
org.apache.flink.types.Row |
copy(org.apache.flink.types.Row from) |
org.apache.flink.types.Row |
copy(org.apache.flink.types.Row from,
org.apache.flink.types.Row reuse) |
org.apache.flink.types.Row |
createInstance() |
org.apache.flink.types.Row |
deserialize(org.apache.flink.core.memory.DataInputView source) |
org.apache.flink.types.Row |
deserialize(org.apache.flink.types.Row reuse,
org.apache.flink.core.memory.DataInputView source) |
org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row> |
duplicate() |
boolean |
equals(Object o) |
int |
getLength() |
int |
hashCode() |
boolean |
isImmutableType() |
void |
serialize(org.apache.flink.types.Row row,
org.apache.flink.core.memory.DataOutputView target) |
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<org.apache.flink.types.Row> |
snapshotConfiguration() |
public EventRowSerializer(org.apache.flink.api.common.typeutils.TypeSerializer<?>[] fieldSerializers,
LinkedHashMap<String,Integer> positionByName)
public boolean isImmutableType()
isImmutableType in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>public org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row> duplicate()
duplicate in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>public org.apache.flink.types.Row createInstance()
createInstance in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>public org.apache.flink.types.Row copy(org.apache.flink.types.Row from)
copy in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>public org.apache.flink.types.Row copy(org.apache.flink.types.Row from,
@Nullable
org.apache.flink.types.Row reuse)
copy in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>public int getLength()
getLength in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>public void serialize(org.apache.flink.types.Row row,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
serialize in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>IOExceptionpublic org.apache.flink.types.Row deserialize(org.apache.flink.core.memory.DataInputView source)
throws IOException
deserialize in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>IOExceptionpublic org.apache.flink.types.Row deserialize(@Nullable org.apache.flink.types.Row reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>IOExceptionpublic void copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
copy in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>IOExceptionpublic boolean equals(Object o)
equals in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>public int hashCode()
hashCode in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>public org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<org.apache.flink.types.Row> snapshotConfiguration()
snapshotConfiguration in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row>Copyright © 2025. All rights reserved.