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 for
MapView. 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:
-
Constructor Summary
ConstructorsConstructorDescriptionMapViewSerializer(org.apache.flink.api.common.typeutils.TypeSerializer<Map<K, V>> mapSerializer) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidcopy(org.apache.flink.core.memory.DataInputView source, org.apache.flink.core.memory.DataOutputView target) Deprecated.Deprecated.Deprecated.Deprecated.deserialize(org.apache.flink.core.memory.DataInputView source) Deprecated.deserialize(MapView<K, V> reuse, org.apache.flink.core.memory.DataInputView source) Deprecated.Deprecated.booleanDeprecated.intDeprecated.Deprecated.inthashCode()Deprecated.booleanDeprecated.voidDeprecated.Deprecated.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.
-
Constructor Details
-
Method Details
-
isImmutableType
public boolean isImmutableType()Deprecated. -
duplicate
Deprecated. -
createInstance
Deprecated. -
copy
Deprecated. -
copy
Deprecated. -
getLength
public int getLength()Deprecated. -
serialize
public void serialize(MapView<K, V> record, org.apache.flink.core.memory.DataOutputView target) throws IOExceptionDeprecated.- 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 IOExceptionDeprecated.- 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 IOException Deprecated.- Specified by:
copyin classorg.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>> - Throws:
IOException
-
equals
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>
-
getMapSerializer
Deprecated.
-