Package org.apache.flink.table.dataview
Class MapViewSerializer<K,V>
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>
-
- org.apache.flink.table.dataview.MapViewSerializer<K,V>
-
- Type Parameters:
K- The type of the keys in the map.V- The type of the values in the map.
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.typeutils.LegacySerializerSnapshotTransformer<MapView<K,V>>
@Internal @Deprecated public class MapViewSerializer<K,V> extends org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>> implements org.apache.flink.api.common.typeutils.LegacySerializerSnapshotTransformer<MapView<K,V>>
Deprecated.A serializer forMapView. The serializer relies on a key serializer and a value serializer for the serialization of the map's key-value pairs.The serialization format for the map is as follows: four bytes for the length of the map, followed by the serialized representation of each key-value pair. To allow null values, each value is prefixed by a null marker.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MapViewSerializer(org.apache.flink.api.common.typeutils.TypeSerializer<Map<K,V>> mapSerializer)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcopy(org.apache.flink.core.memory.DataInputView source, org.apache.flink.core.memory.DataOutputView target)Deprecated.MapView<K,V>copy(MapView<K,V> from)Deprecated.MapView<K,V>copy(MapView<K,V> from, MapView<K,V> reuse)Deprecated.MapView<K,V>createInstance()Deprecated.MapView<K,V>deserialize(org.apache.flink.core.memory.DataInputView source)Deprecated.MapView<K,V>deserialize(MapView<K,V> reuse, org.apache.flink.core.memory.DataInputView source)Deprecated.org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>duplicate()Deprecated.booleanequals(Object obj)Deprecated.intgetLength()Deprecated.org.apache.flink.api.common.typeutils.TypeSerializer<Map<K,V>>getMapSerializer()Deprecated.inthashCode()Deprecated.booleanisImmutableType()Deprecated.voidserialize(MapView<K,V> record, org.apache.flink.core.memory.DataOutputView target)Deprecated.org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<MapView<K,V>>snapshotConfiguration()Deprecated.<U> org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<MapView<K,V>>transformLegacySerializerSnapshot(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<U> legacySnapshot)Deprecated.We need to override this as aLegacySerializerSnapshotTransformerbecause in Flink 1.6.x and below, this serializer was incorrectly returning directly the snapshot of the nested map serializer as its own snapshot.
-
-
-
Method Detail
-
isImmutableType
public boolean isImmutableType()
Deprecated.
-
duplicate
public org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>> duplicate()
Deprecated.
-
getLength
public int getLength()
Deprecated.
-
serialize
public void serialize(MapView<K,V> record, org.apache.flink.core.memory.DataOutputView target) throws IOException
Deprecated.- Specified by:
serializein classorg.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>- Throws:
IOException
-
deserialize
public MapView<K,V> deserialize(org.apache.flink.core.memory.DataInputView source) throws IOException
Deprecated.- Specified by:
deserializein classorg.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>- Throws:
IOException
-
deserialize
public MapView<K,V> deserialize(MapView<K,V> reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
Deprecated.- Specified by:
deserializein classorg.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>- Throws:
IOException
-
copy
public void copy(org.apache.flink.core.memory.DataInputView source, org.apache.flink.core.memory.DataOutputView target) throws IOExceptionDeprecated.- Specified by:
copyin classorg.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>- Throws:
IOException
-
equals
public boolean equals(Object obj)
Deprecated.
-
hashCode
public int hashCode()
Deprecated.
-
snapshotConfiguration
public org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<MapView<K,V>> snapshotConfiguration()
Deprecated.
-
transformLegacySerializerSnapshot
public <U> org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<MapView<K,V>> transformLegacySerializerSnapshot(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<U> legacySnapshot)
Deprecated.We need to override this as aLegacySerializerSnapshotTransformerbecause in Flink 1.6.x and below, this serializer was incorrectly returning directly the snapshot of the nested map serializer as its own snapshot.This method transforms the incorrect map serializer snapshot to be a proper
MapViewSerializerSnapshot.- Specified by:
transformLegacySerializerSnapshotin interfaceorg.apache.flink.api.common.typeutils.LegacySerializerSnapshotTransformer<K>
-
-