T - The type of element in the list.@Internal public class ListViewSerializer<T> extends org.apache.flink.api.common.typeutils.TypeSerializer<ListView<T>> implements org.apache.flink.api.common.typeutils.LegacySerializerSnapshotTransformer<ListView<T>>
The serialization format for the list is as follows: four bytes for the length of the list, followed by the serialized representation of each element.
| 构造器和说明 |
|---|
ListViewSerializer(org.apache.flink.api.common.typeutils.TypeSerializer<List<T>> listSerializer) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target) |
ListView<T> |
copy(ListView<T> from) |
ListView<T> |
copy(ListView<T> from,
ListView<T> reuse) |
ListView<T> |
createInstance() |
ListView<T> |
deserialize(org.apache.flink.core.memory.DataInputView source) |
ListView<T> |
deserialize(ListView<T> reuse,
org.apache.flink.core.memory.DataInputView source) |
org.apache.flink.api.common.typeutils.TypeSerializer<ListView<T>> |
duplicate() |
boolean |
equals(Object obj) |
int |
getLength() |
org.apache.flink.api.common.typeutils.TypeSerializer<List<T>> |
getListSerializer() |
int |
hashCode() |
boolean |
isImmutableType() |
void |
serialize(ListView<T> record,
org.apache.flink.core.memory.DataOutputView target) |
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<ListView<T>> |
snapshotConfiguration() |
<U> org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<ListView<T>> |
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 list serializer as its own snapshot. |
public boolean isImmutableType()
public int getLength()
public void serialize(ListView<T> record, org.apache.flink.core.memory.DataOutputView target) throws IOException
serialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<ListView<T>>IOExceptionpublic ListView<T> deserialize(org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<ListView<T>>IOExceptionpublic ListView<T> deserialize(ListView<T> reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<ListView<T>>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<ListView<T>>IOExceptionpublic boolean equals(Object obj)
public int hashCode()
public org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<ListView<T>> snapshotConfiguration()
public <U> org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<ListView<T>> 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 list serializer as its own snapshot.
This method transforms the incorrect list serializer snapshot
to be a proper ListViewSerializerSnapshot.
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.