K - The type of the keys in the map.V - The type of the values in the map.@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>>
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.
| 构造器和说明 |
|---|
MapViewSerializer(org.apache.flink.api.common.typeutils.TypeSerializer<Map<K,V>> mapSerializer)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target)
已过时。
|
MapView<K,V> |
copy(MapView<K,V> from)
已过时。
|
MapView<K,V> |
copy(MapView<K,V> from,
MapView<K,V> reuse)
已过时。
|
MapView<K,V> |
createInstance()
已过时。
|
MapView<K,V> |
deserialize(org.apache.flink.core.memory.DataInputView source)
已过时。
|
MapView<K,V> |
deserialize(MapView<K,V> reuse,
org.apache.flink.core.memory.DataInputView source)
已过时。
|
org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>> |
duplicate()
已过时。
|
boolean |
equals(Object obj)
已过时。
|
int |
getLength()
已过时。
|
org.apache.flink.api.common.typeutils.TypeSerializer<Map<K,V>> |
getMapSerializer()
已过时。
|
int |
hashCode()
已过时。
|
boolean |
isImmutableType()
已过时。
|
void |
serialize(MapView<K,V> record,
org.apache.flink.core.memory.DataOutputView target)
已过时。
|
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<MapView<K,V>> |
snapshotConfiguration()
已过时。
|
<U> org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<MapView<K,V>> |
transformLegacySerializerSnapshot(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<U> legacySnapshot)
已过时。
We need to override this as a
LegacySerializerSnapshotTransformer because in Flink
1.6.x and below, this serializer was incorrectly returning directly the snapshot of the
nested map serializer as its own snapshot. |
public boolean isImmutableType()
public org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>> duplicate()
public int getLength()
public void serialize(MapView<K,V> record, org.apache.flink.core.memory.DataOutputView target) throws IOException
serialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>IOExceptionpublic MapView<K,V> deserialize(org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>IOExceptionpublic MapView<K,V> deserialize(MapView<K,V> reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>IOExceptionpublic void copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
copy 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<MapView<K,V>>IOExceptionpublic boolean equals(Object obj)
public int hashCode()
public org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<MapView<K,V>> snapshotConfiguration()
public <U> org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<MapView<K,V>> transformLegacySerializerSnapshot(org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<U> legacySnapshot)
LegacySerializerSnapshotTransformer because 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.
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.