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.
Constructor and Description |
---|
ListViewSerializer(org.apache.flink.api.common.typeutils.TypeSerializer<List<T>> listSerializer) |
Modifier and Type | Method and Description |
---|---|
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
in class org.apache.flink.api.common.typeutils.TypeSerializer<ListView<T>>
IOException
public ListView<T> deserialize(org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize
in class org.apache.flink.api.common.typeutils.TypeSerializer<ListView<T>>
IOException
public ListView<T> deserialize(ListView<T> reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize
in class org.apache.flink.api.common.typeutils.TypeSerializer<ListView<T>>
IOException
public 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<ListView<T>>
IOException
public 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–2019 The Apache Software Foundation. All rights reserved.